Skip to content
This repository has been archived by the owner. It is now read-only.

[/usr/lib64/tmpfiles.d/rkt.conf:1] Unknown group 'rkt'. #1137

Closed
ghost opened this issue Feb 25, 2016 · 5 comments
Closed

[/usr/lib64/tmpfiles.d/rkt.conf:1] Unknown group 'rkt'. #1137

ghost opened this issue Feb 25, 2016 · 5 comments

Comments

@ghost
Copy link

@ghost ghost commented Feb 25, 2016

Rkt in CoreOS 962.0.0 seems to have some problem:

Feb 25 08:36:15 [...] systemd-tmpfiles[705]: [/usr/lib64/tmpfiles.d/rkt.conf:1] Unknown group 'rkt'.

This happened after upgrading from 899.7.0.

@crawford
Copy link
Member

@crawford crawford commented Feb 26, 2016

@mischief We moved the group generation to systemd-sysusers, right?

@marineam
Copy link

@marineam marineam commented Feb 26, 2016

@crawford yeah, sysusers.

I bet the problem is that /usr modification time is based on the build time of the image, not when it was installed to the system and systemd's "needs update" condition for /etc is approximately "mtime(/etc/.stamp) < mtime(/usr)" so if a system boots and then updates to a version that was built prior to that first boot the update logic doesn't trigger. Previously this wasn't an issue because a smaller set of things hinged on that logic. We need to adjust that logic to be "mtime(/etc/.stamp) != mtime(/usr)". I considered adjusting the logic previously but probably only in the context of rollbacks where this doesn't pose much of an issue instead of the context of the ordering of first boot and build.

Need to double check that this is accurate, it was a long time ago that I read that code last.

@marineam
Copy link

@marineam marineam commented Feb 26, 2016

Yeah, probably need this patch (not tested):

diff --git a/src/shared/condition.c b/src/shared/condition.c
index f937858..2845a72 100644
--- a/src/shared/condition.c
+++ b/src/shared/condition.c
@@ -308,8 +308,8 @@ static int condition_test_needs_update(Condition *c) {
         if (lstat("/usr/", &usr) < 0)
                 return true;

-        return usr.st_mtim.tv_sec > other.st_mtim.tv_sec ||
-                (usr.st_mtim.tv_sec == other.st_mtim.tv_sec && usr.st_mtim.tv_nsec > other.st_mtim.tv_nsec);
+        return usr.st_mtim.tv_sec != other.st_mtim.tv_sec ||
+                (usr.st_mtim.tv_sec == other.st_mtim.tv_sec && usr.st_mtim.tv_nsec != other.st_mtim.tv_nsec);
 }

 static int condition_test_first_boot(Condition *c) {
@crawford crawford self-assigned this Mar 2, 2016
@crawford
Copy link
Member

@crawford crawford commented Mar 2, 2016

coreos/systemd#34 should fix the issue @marineam is speaking of. I haven't tested yet to make sure that this actually fixes the rkt group issue.

@crawford
Copy link
Member

@crawford crawford commented Mar 3, 2016

It does fix the issue. The group should magically appear when you update to the next Alpha.

$ systemctl status systemd-tmpfiles-setup.service
● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
   Loaded: loaded (/usr/lib64/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-03-03 10:16:32 UTC; 57s ago
     Docs: man:tmpfiles.d(5)
           man:systemd-tmpfiles(8)
  Process: 562 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=1/FAILURE)
 Main PID: 562 (code=exited, status=1/FAILURE)
$ cat /etc/group
wheel:x:10:root,core
sudo:x:150:
docker:x:233:core

Update

$ systemctl status systemd-tmpfiles-setup.service
● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
   Loaded: loaded (/usr/lib64/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
   Active: active (exited) since Thu 2016-03-03 10:18:22 UTC; 5s ago
     Docs: man:tmpfiles.d(5)
           man:systemd-tmpfiles(8)
  Process: 608 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=0/SUCCESS)
 Main PID: 608 (code=exited, status=0/SUCCESS)
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/systemd-tmpfiles-setup.service
$ cat /etc/group
wheel:x:10:root,core
sudo:x:150:
docker:x:233:core
rkt:x:251:core
@crawford crawford closed this Mar 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.