Bug 1323975 - sshd service not started after first boot
Summary: sshd service not started after first boot
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-node
Classification: oVirt
Component: Installation & Update
Version: master
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.0.0-beta
: 4.0
Assignee: Douglas Schilling Landgraf
QA Contact: Wei Wang
URL:
Whiteboard:
Depends On: 1327332
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-05 08:50 UTC by Tareq Alayan
Modified: 2016-07-05 08:02 UTC (History)
6 users (show)

Fixed In Version: ovirt-node-ng-installer-master-2016050300.iso
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-05 08:02:20 UTC
oVirt Team: Node
Embargoed:
rule-engine: ovirt-4.0.0+
ycui: testing_plan_complete?
rule-engine: planning_ack+
fdeutsch: devel_ack+
ycui: testing_ack+


Attachments (Terms of Use)
ks_file (373 bytes, text/plain)
2016-04-12 08:45 UTC, Wei Wang
no flags Details
screenshot_cmd (195.03 KB, image/png)
2016-04-12 08:48 UTC, Wei Wang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 56167 0 master MERGED build: Remove old ifcfgs 2016-04-15 03:03:17 UTC
oVirt gerrit 56190 0 master MERGED node: Enable sshd.service by default 2016-04-17 06:19:48 UTC
oVirt gerrit 56673 0 ovirt-4.0 MERGED node: Enable sshd.service by default 2016-04-27 09:18:23 UTC
oVirt gerrit 56741 0 ovirt-3.6 MERGED node: Enable sshd.service by default 2016-04-28 10:10:45 UTC

Description Tareq Alayan 2016-04-05 08:50:48 UTC
Description of problem:
The sshd.service is not up after first boot

Version-Release number of selected component (if applicable):


How reproducible:
always


Steps to Reproduce:
1. try to install rhevh-next with ks[1]

Actual results:
sshd is down


Expected results:
sshd is up

Additional info:
[1]
install
lang en_US.UTF-8
keyboard us
rootpw  --plaintext qum5net
timezone --utc Asia/Jerusalem
#rootpw  --iscrypted $1$YUiJIZva$o5YaluST.el8H83.JpLPl/
sshpw --username=root qum5net --plaintext

# partitioning - nuke and start fresh
zerombr
clearpart --all --initlabel
autopart --type=thinp
bootloader --location=mbr

reboot

liveimg --url=http://art-build-srv.qa.lab.tlv.redhat.com/rhevh/rhevh-next-2/20160404/ovirt-node-ng-image.squashfs.img

firewall --service=ssh
services --enabled=sshd

#reboot

%packages
openssh-server
%end

%post --log=/root/kickstart-post-section.log
set -x
echo "RUNNING: /usr/bin/curl http://jenkins-foreman.qa.lab.tlv.redhat.com:80/unattended/built"
/usr/bin/curl http://jenkins-foreman.qa.lab.tlv.redhat.com:80/unattended/built
echo "RUNNING: /usr/sbin/imgbase -------"
/usr/sbin/imgbase layout --init
/usr/sbin/imgbase --experimental volume --create /var 4G
systemctl start sshd
#/usr/sbin/reboot
%end

Comment 1 Red Hat Bugzilla Rules Engine 2016-04-05 09:32:32 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 4 Fabian Deutsch 2016-04-06 14:49:05 UTC
One comment: A network directive is not in the kickstart - it could be added to ensure that networking is really up.

Comment 5 Tareq Alayan 2016-04-07 14:28:59 UTC
the below kickstart worked for me. 


install
lang en_US.UTF-8
keyboard us
rootpw  --plaintext 1234
timezone --utc Asia/Jerusalem
#rootpw  --iscrypted <%= root_pass %>
sshpw --username=root qum5net --plaintext

# partitioning - nuke and start fresh
zerombr
clearpart --all --initlabel
autopart --type=thinp
bootloader --location=mbr

reboot

liveimg --url=http://{url}/rhevnext/ovirt-node-ng-image.squashfs.img

firewall --service=ssh
services --enabled=sshd

#reboot



#%post --log=/root/kickstart-post-section.log
%post --log=/root/ks.post.log
set -x
echo "RUNNING: /usr/sbin/imgbase -------"
/usr/sbin/imgbase layout --init
/usr/sbin/imgbase --experimental volume --create /var 4G
echo "TESTING: .... "
systemctl start sshd-keygen.service
ls -l /etc/ssh/ssh_host_* > /root/ssh.host
md5sum /etc/ssh/ssh_host_* > /root/ssh.md5sum
systemctl status ssh-keygen > systemctl.out
systemctl start sshd.service
systemctl status sshd.service
echo "RUNNING: /usr/bin/curl http://{foreman-url}:80/unattended/built"
/usr/bin/curl http://{foremna-machine}/unattended/built
sync
#/usr/sbin/reboot
%end

Comment 7 Fabian Deutsch 2016-04-07 15:38:34 UTC
Thanks Tareq.

The scope of this bug is to ensure that sshd is running and can be used when these two lines appear in the kickstart:

firewall --service=ssh
services --enabled=sshd

There shouldn't be any additional %post-let be required.

Comment 8 Fabian Deutsch 2016-04-08 20:53:05 UTC
This sounds a bit like a random failure. I also can just reproduce it sometimes.

Comment 9 Wei Wang 2016-04-12 08:44:24 UTC
Description of problem:
The sshd.service is not up after first boot

Version-Release number of selected component (if applicable):
ovirt-node-ng-installer-ovirt-3.6-2016041120.iso
imgbased-0.5-git50033ca


How reproducible:
bug is reproduced 3 times after retest 5 times


Steps to Reproduce:
1. Install rhevh-next with ks file
2. Check sshd service status with CLI: systemctl status sshd.service

Actual results:
sshd is down(random)


Additional info:
ks file is attached into attchment. in the ks file, added below command
firewall --service=ssh
services --enabled=sshd
The belows info is attached into attachment as screenshot_cmd
# ip addr show
# firewall-cmd --get-default-zone
# firewall-cmd --get-services

Comment 10 Wei Wang 2016-04-12 08:45:14 UTC
Created attachment 1146290 [details]
ks_file

Comment 11 Wei Wang 2016-04-12 08:48:26 UTC
Created attachment 1146291 [details]
screenshot_cmd

Comment 12 Fabian Deutsch 2016-04-14 20:08:15 UTC
I think this is an ssh or systemd bug, see bug 1327332

Comment 13 Wei Wang 2016-05-31 09:33:32 UTC
Retest the bug with ovirt-node-ng-installer-master-2016051100.iso, the bug cannot be reproduced

Version:
[root@dhcp-11-209 ~]# rpm -qa | grep imgbased
imgbased-0.6-0.201605091813gita89532a.el7.centos.noarch

[root@dhcp-11-209 ~]# rpm -qa | grep ovirt-node-ng
ovirt-node-ng-image-update-placeholder-4.0.0-0.3.master.20160510065920.gitc48ef8a.el7.noarch

How reproducible:
bug is reproduced 0 times after retest 5 times

Steps:
1. Install rhevh-next with ks file
2. Check sshd service status with CLI: systemctl status sshd.service

Actual results:
sshd is active

So the bug is verified, I will change the status of the bug to "VERIFIED"

Comment 14 Sandro Bonazzola 2016-07-05 08:02:20 UTC
oVirt 4.0.0 has been released, closing current release.


Note You need to log in before you can comment on or make changes to this bug.