Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1323975

Summary: sshd service not started after first boot
Product: [oVirt] ovirt-node Reporter: Tareq Alayan <talayan>
Component: Installation & UpdateAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Wang <weiwang>
Severity: high Docs Contact:
Priority: high    
Version: masterCC: bugs, cshao, dougsland, fdeutsch, talayan, ycui
Target Milestone: ovirt-4.0.0-betaFlags: rule-engine: ovirt-4.0.0+
ycui: testing_plan_complete?
rule-engine: planning_ack+
fdeutsch: devel_ack+
ycui: testing_ack+
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-ng-installer-master-2016050300.iso Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 08:02:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1327332    
Bug Blocks:    
Attachments:
Description Flags
ks_file
none
screenshot_cmd none

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.