lkvm: make sure $HOME is defined before running lkvm #1447
Conversation
As we are using rkt only from root account (privileges needed by network setup) - it LGTM. |
@@ -136,7 +136,7 @@ bind: No such file or directory | |||
Warning: Failed init: kvm_ipc__init | |||
``` | |||
|
|||
The LKVM stage1 currently requires $HOME to be defined | |||
The LKVM stage1 currently requires $HOME to be defined and valid | |||
(see [issue #1393](https://github.com/coreos/rkt/issues/1393)). | |||
When started from a systemd unit file, use `User=root`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean to remove these lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am undecided whether to keep that paragraph. I decided to keep it just in case the user mistakenly starts rkt with $HOME=/nonexistent-dir
or something... but that's not very plausible so I'm ok to remove these lines if you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, I think it's clearer if we just remove them for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, removing
LGTM modulo one question |
kvmtool currently does not work when $HOME is not defined. When started by a systemd unit file (or by systemd-run), $HOME is typically undefined, unless "User=" (or resp. "--uid=") is given. Instead of asking users to work around the issue with "User=" or "--uid=", just define that variable in rkt before calling lkvm. This could be removed when this gets fixed in lkvm upstream. Issue described in rkt#1393
83f94ca
to
c43be2e
Compare
LGTM |
lkvm: make sure $HOME is defined before running lkvm
Thanks! |
kvmtool currently does not work when $HOME is not defined. When started
by a systemd unit file (or by systemd-run), $HOME is typically
undefined, unless "User=" (or resp. "--uid=") is given.
Instead of asking users to work around the issue with "User=" or
"--uid=", just define that variable in rkt before calling lkvm.
This could be removed when this gets fixed in lkvm upstream.
Issue described in #1393
/cc @jellonek