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

udbsync: update both nfsroot_staging and nfsroot_ro in udbsync.passwd #183

Closed
wants to merge 1 commit into from

Conversation

zopieux
Copy link
Member

@zopieux zopieux commented Mar 15, 2020

Fixes #169.

Tested:

$ machinectl shell myrhfs0
$ diff -u /export/nfsroot_{staging,ro}/etc/group
  ( empty )

$ systemd-nspawn -D /export/nfsroot_staging
  $ pacman -S minidlna
  ...
  Creating user minidlna (minidlna server) with uid 971 and gid 971.

$ diff -u /export/nfsroot_{staging,ro}/etc/group
--- /export/nfsroot_staging/etc/group   2020-03-15 21:36:38.539844642 +0100
+++ /export/nfsroot_ro/etc/group        2020-03-15 21:34:10.167058855 +0100
@@ -76,2 +76,1 @@
-minidlna:x:971:

$ systemctl restart udbsync_passwd_nfsroot

$ diff -u /export/nfsroot_{staging,ro}/etc/group
  ( empty )

@zopieux zopieux requested a review from audebert March 15, 2020 20:42
Fixes #169.

Tested:

$ machinectl shell myrhfs0
$ diff -u /export/nfsroot_{staging,ro}/etc/group
  ( empty )

$ systemd-nspawn -D /export/nfsroot_staging
  $ pacman -S minidlna
  ...
  Creating user minidlna (minidlna server) with uid 971 and gid 971.

$ diff -u /export/nfsroot_{staging,ro}/etc/group
--- /export/nfsroot_staging/etc/group   2020-03-15 21:36:38.539844642 +0100
+++ /export/nfsroot_ro/etc/group        2020-03-15 21:34:10.167058855 +0100
@@ -76,2 +76,1 @@
-minidlna:x:971:

$ systemctl restart udbsync_passwd_nfsroot

$ diff -u /export/nfsroot_{staging,ro}/etc/group
  ( empty )
Copy link
Member

@seirl seirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like something that could be achieved with a .path, like we do here:

https://github.com/prologin/sadm/blob/master/etc/systemd/system/rootssh.path

https://github.com/prologin/sadm/blob/master/etc/systemd/system/rootssh-copy.service

This service uses inotify to watch for changes in rootssh, and copy the changes in the appropriate directory. I think this would be a lot less hacky than having this --exec-after command.

@seirl
Copy link
Member

seirl commented May 8, 2020

No longer needed, we don't use _staging and _ro anymore.

@seirl seirl closed this May 8, 2020
@seirl seirl deleted the fix-passwd-sync branch May 9, 2020 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure udbsync clients for nfsroot to write in nfsroot_staging instead of nfsroot_ro
2 participants