Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

lkvm: make sure $HOME is defined before running lkvm #1447

Merged
merged 1 commit into from Sep 23, 2015

Conversation

alban
Copy link
Member

@alban alban commented Sep 20, 2015

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

@jellonek
Copy link
Contributor

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`.
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, removing

@jonboulle
Copy link
Contributor

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
@iaguis
Copy link
Member

iaguis commented Sep 23, 2015

LGTM

iaguis added a commit that referenced this pull request Sep 23, 2015
lkvm: make sure $HOME is defined before running lkvm
@iaguis iaguis merged commit 871c060 into rkt:master Sep 23, 2015
@alban
Copy link
Member Author

alban commented Sep 23, 2015

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants