Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zopen-promote ZOPEN_ROOTFS needs to be dynamic #39

Open
lbdyck opened this issue Dec 6, 2023 · 4 comments
Open

zopen-promote ZOPEN_ROOTFS needs to be dynamic #39

lbdyck opened this issue Dec 6, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@lbdyck
Copy link

lbdyck commented Dec 6, 2023

The ZOPEN_ROOTFS is statically defined and needs to be dynamic.

For example

  • I install into my home/zopen directory
  • then i promote to home/tmp which is a mounted zfs
  • then unmount and remount to /usr/local/zopen

With the current process the ZOPEN_ROOTFS must be changed in the zopen-config file. If dynamic then it won't :)

@DevonianTeuchter
Copy link
Collaborator

The slight issue is that zopen-config itself needs to have some frame of reference as to where the ZOPEN_ROOTFS is to setup the infrastructure. It could calculate it from being located within an '/etc' directory. However... we don't currently state that zopen-config has to be located in that location (ZOPEN_ROOTFS/etc/zopen-config) but with the auto-updating when meta updates, it would be hard to allow it to be anywhere else [like if a user copies it to their $HOME, modifies it and then sources it from there to customize something].
My vote would be to document that zopen-config must not be copied elsewhere and would thus remain the "source-of-truth" for where the ZOPEN_ROOTFS is anchored (at ./../), with ZOPEN_ROOTFS being dynamically calculated based off the zopen-config location itself. Would also not be a breaking change...

@lbdyck
Copy link
Author

lbdyck commented Dec 6, 2023

Given that

  1. No one in their right minds will do a promote to a production level filesystem
  2. the promote will be to a temp location to verify
  3. the temp location will be unmounted
  4. the production location will be unmounted
  5. the new promote zfs will be mounted at the production mount point
  6. The zopen-config will have to be updated with the new ZOPEN_ROOTFS.

Perhaps have a command that one runs from the newly mounted filesystem to update the zopen-config or determine dynamically that it was called from a user/system profile as . /usr/zopen/etc/zopen-config and use that path?

Just looking for ways to make sure it works in this mode, which I suspect will be the norm.

@DevonianTeuchter DevonianTeuchter added the enhancement New feature or request label Dec 6, 2023
@DevonianTeuchter
Copy link
Collaborator

@MikeFultonDev 's blog post about sudo here links to some scripts of his that do just that...

@lbdyck
Copy link
Author

lbdyck commented Dec 7, 2023

Nice - but this needs to be dynamic/automatic and not something each site needs to do manually. That script may be a good thing to incorporate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants