<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 12/08/2015 11:10 AM, Peter Steele wrote:<br>
<blockquote cite="mid:56672B12.2000603@gmail.com" type="cite">On
12/08/2015 08:00 AM, Serge Hallyn wrote:
<br>
<blockquote type="cite">Ok, can you change the launch command in
the scripts to
<br>
<br>
lxc-start -n $containername -L /tmp/$containername.cout -l trace
-o /tmp/$containername.dout -- /sbin/init log_target=console
log_level=debug
<br>
<br>
The console output will go into the .cout file and lxc debug
output into .dout.
<br>
<br>
</blockquote>
<br>
</blockquote>
I did another test and hit the original sshd-keygen error on one of
my containers. The /var/log/messages file for that container
reported the following:<br>
<br>
Dec 8 11:58:13 pws-vm-04 systemd: Starting OpenSSH Server Key
Generation...<br>
Dec 8 11:58:13 pws-vm-04 systemd: Failed at step CGROUP spawning
/usr/sbin/sshd-keygen: No such file or directory<br>
Dec 8 11:58:13 pws-vm-04 systemd: sshd-keygen.service: main process
exited, code=exited, status=219/CGROUP<br>
Dec 8 11:58:13 pws-vm-04 systemd: Failed to start OpenSSH Server
Key Generation.<br>
Dec 8 11:58:13 pws-vm-04 systemd: Unit sshd-keygen.service entered
failed state.<br>
Dec 8 11:58:16 pws-vm-04 systemd: Starting OpenSSH server daemon...<br>
Dec 8 11:58:16 pws-vm-04 systemd: Started OpenSSH server daemon.<br>
Dec 8 11:58:16 pws-vm-04 sshd: Could not load host key:
/etc/ssh/ssh_host_rsa_key<br>
Dec 8 11:58:16 pws-vm-04 sshd: Could not load host key:
/etc/ssh/ssh_host_ecdsa_key<br>
Dec 8 11:58:16 pws-vm-04 sshd: Could not load host key:
/etc/ssh/ssh_host_ed25519_key<br>
Dec 8 11:58:58 pws-vm-04 sshd[722]: error: Could not load host key:
/etc/ssh/ssh_host_rsa_key<br>
Dec 8 11:58:58 pws-vm-04 sshd[722]: error: Could not load host key:
/etc/ssh/ssh_host_ecdsa_key<br>
Dec 8 11:58:58 pws-vm-04 sshd[722]: error: Could not load host key:
/etc/ssh/ssh_host_ed25519_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[724]: error: Could not load host key:
/etc/ssh/ssh_host_rsa_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[724]: error: Could not load host key:
/etc/ssh/ssh_host_ecdsa_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[724]: error: Could not load host key:
/etc/ssh/ssh_host_ed25519_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[726]: error: Could not load host key:
/etc/ssh/ssh_host_rsa_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[726]: error: Could not load host key:
/etc/ssh/ssh_host_ecdsa_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[726]: error: Could not load host key:
/etc/ssh/ssh_host_ed25519_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[728]: error: Could not load host key:
/etc/ssh/ssh_host_rsa_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[728]: error: Could not load host key:
/etc/ssh/ssh_host_ecdsa_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[728]: error: Could not load host key:
/etc/ssh/ssh_host_ed25519_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[730]: error: Could not load host key:
/etc/ssh/ssh_host_rsa_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[730]: error: Could not load host key:
/etc/ssh/ssh_host_ecdsa_key<br>
Dec 8 11:59:00 pws-vm-04 sshd[730]: error: Could not load host key:
/etc/ssh/ssh_host_ed25519_key<br>
Dec 8 11:59:02 pws-vm-04 sshd[831]: error: Could not load host key:
/etc/ssh/ssh_host_rsa_key<br>
Dec 8 11:59:02 pws-vm-04 sshd[831]: error: Could not load host key:
/etc/ssh/ssh_host_ecdsa_key<br>
Dec 8 11:59:02 pws-vm-04 sshd[831]: error: Could not load host key:
/etc/ssh/ssh_host_ed25519_key<br>
Dec 8 11:59:02 pws-vm-04 sshd[833]: error: Could not load host key:
/etc/ssh/ssh_host_rsa_key<br>
Dec 8 11:59:02 pws-vm-04 sshd[833]: error: Could not load host key:
/etc/ssh/ssh_host_ecdsa_key<br>
Dec 8 11:59:02 pws-vm-04 sshd[833]: error: Could not load host key:
/etc/ssh/ssh_host_ed25519_key<br>
<br>
The .cout file for this container looked normal except, of course,
for some ssh related messages:<br>
<br>
Starting OpenSSH Server Key Generation...<br>
FAILED Failed to start OpenSSH Server Key Generation.<br>
See 'systemctl status sshd-keygen.service' for details.<br>
Starting OpenSSH server daemon...<br>
<br>
The .dout file had no errors related to sshd in this particular
test. <br>
<br>
In another test, I tried creating several containers with the
command <br>
<br>
lxc-create -n testN -t download -- -d centos -r 7 -a amd64<br>
<br>
and then started them all in the same manner as my other tests
using:<br>
<br>
for vm in `lxc-ls`; do lxc-start -n $vm -L <i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>tmp<span class="moz-txt-tag">/</span></i>$vm.cout
-l trace -o <i class="moz-txt-slash"><span class="moz-txt-tag">/</span>tmp<span
class="moz-txt-tag">/</span></i>$vm.dout -- /sbin/init
log_target=console log_level=debug; done
<br>
<br>
In this case of course the containers are using the stock downloaded
CentOS 7 image instead of my custom image. I was unable to reproduce
the systemd error through multiple start/stop tests of my
containers. They always started up without any complaints. Granted,
these stock images are simpler than my custom images, but this seems
to point to something in my image that's causing this issue. At
least that gives me a bit to go on, although it's hard to understand
what additional rpm modules would cause systemd to behave this way
during bootup.<br>
<br>
Peter<br>
<br>
</body>
</html>