Bug 808699

Summary: /etc/init.d/ovirt-cim does not work well.
Product: Red Hat Enterprise Linux 6 Reporter: Guohua Ouyang <gouyang>
Component: ovirt-nodeAssignee: Fabian Deutsch <fdeutsch>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, bsarathy, cshao, fdeutsch, gouyang, jboggs, leiwang, mburns, ovirt-maint, sgordon, shcao, ycui, yuachen
Target Milestone: beta   
Target Release: 6.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-2.3.0-4.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-19 14:20:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Guohua Ouyang 2012-03-31 09:39:51 UTC
Description of problem:
/etc/init.d/ovirt-cim does not work well:
1. report "missing job name' by execute service stop/start/reload
2. iptables-save content displayed by execute service stop
3. /etc/init.d/ovirt-cim status does not work, it show stopped even just after start ovirt-cim.



[root@localhost admin]# /etc/init.d/ovirt-cim stop
stop: missing job name
Try `stop --help' for more information.
Stopping ovirt-cim: # Generated by iptables-save v1.4.7 on Sat Mar 31 08:44:11 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p icmp -j ACCEPT 
-A INPUT -i lo -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 54321 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 16514 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT 
-A INPUT -p tcp -m multiport --dports 5634:6166 -j ACCEPT 
-A INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT 
-A INPUT -p udp -m udp --dport 161 -j ACCEPT 
-A INPUT -j REJECT --reject-with icmp-host-prohibited 
-A FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp-host-prohibited 
COMMIT
# Completed on Sat Mar 31 08:44:11 2012

[root@localhost admin]# /etc/init.d/ovirt-cim start
start: missing job name
Try `start --help' for more information.
Starting ovirt-cim:                                        [  OK  ]

[root@localhost admin]# /etc/init.d/ovirt-cim status
Usage: status [-p pidfile] {program}
ovirt-cim is stopped

[root@localhost admin]# /etc/init.d/ovirt-cim reload
reload: missing job name
Try `reload --help' for more information.
Stopping ovirt-cim: # Generated by iptables-save v1.4.7 on Sat Mar 31 08:44:33 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p icmp -j ACCEPT 
-A INPUT -i lo -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 54321 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 16514 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT 
-A INPUT -p tcp -m multiport --dports 5634:6166 -j ACCEPT 
-A INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT 
-A INPUT -p udp -m udp --dport 161 -j ACCEPT 
-A INPUT -j REJECT --reject-with icmp-host-prohibited 
-A FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp-host-prohibited 
COMMIT
# Completed on Sat Mar 31 08:44:33 2012
[root@localhost admin]#                                    [  OK  ]




Version-Release number of selected component (if applicable):
rhev-hypervisor6-6.3-20120330.0.el6 

How reproducible:
100%

Steps to Reproduce:
1.
 
Actual results:

Expected results:


Additional info:

Comment 2 Fabian Deutsch 2012-04-10 16:22:48 UTC
http://gerrit.virt.bos.redhat.com:8080/gerrit/#change,140

The above patch fixes the "missing job name" messages and the missing status return.
But I could not reproduce the iptables output.

Comment 4 Guohua Ouyang 2012-04-16 06:16:33 UTC
tested on 6.3-20120411.1:
1. service ovirt-cim stop show iptables output, to reproduce this need to configure cim on tui.
2. service ovirt-cim status fail to work, it always say "is stopped".




[root@dell-760 init.d]# service ovirt-cim stop
Stopping ovirt-cim: # Generated by iptables-save v1.4.7 on Mon Apr 16 06:13:23 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p icmp -j ACCEPT 
-A INPUT -i lo -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 54321 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 16514 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT 
-A INPUT -p tcp -m multiport --dports 5634:6166 -j ACCEPT 
-A INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT 
-A INPUT -p udp -m udp --dport 161 -j ACCEPT 
-A INPUT -j REJECT --reject-with icmp-host-prohibited 
-A INPUT -p tcp -m tcp --dport 5989 -j ACCEPT 
-A FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp-host-prohibited 
COMMIT
# Completed on Mon Apr 16 06:13:23 2012
Shutting down sfcb:                                        [  OK  ]
[root@dell-760 init.d]# service ovirt-cim start
Starting ovirt-cim:                                        [  OK  ]
[root@dell-760 init.d]# service ovirt-cim status
 is stopped
[root@dell-760 init.d]# service ovirt-cim restart
# Generated by iptables-save v1.4.7 on Mon Apr 16 06:13:44 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p icmp -j ACCEPT 
-A INPUT -i lo -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 54321 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 16514 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT 
-A INPUT -p tcp -m multiport --dports 5634:6166 -j ACCEPT 
-A INPUT -p tcp -m multiport --dports 49152:49216 -j ACCEPT 
-A INPUT -p udp -m udp --dport 161 -j ACCEPT 
-A INPUT -j REJECT --reject-with icmp-host-prohibited 
-A INPUT -p tcp -m tcp --dport 5989 -j ACCEPT 
-A FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp-host-prohibited 
COMMIT
# Completed on Mon Apr 16 06:13:44 2012
[root@dell-760 init.d]#                                    [  OK  ]

Comment 6 Fabian Deutsch 2012-04-16 13:36:27 UTC
http://gerrit.ovirt.org/#change,3570

Comment 7 Fabian Deutsch 2012-04-16 18:13:15 UTC
Tested upstream with this two patches:

http://gerrit.ovirt.org/3587
http://gerrit.ovirt.org/3588

Test procedure:
- Install node with the german keyboard layout and reboot
= Press the "y" key at the at the login prompt, a "y" appears
- Remove the "y" and loggin with admin
- Select the Network page
- Enter the hostname field
= Press the keys "y!&()z" (after each other), "y!&()z" is appended
- Remove the appended string
- Select the Keyboard page
- Select the "U.S. International" layout and apply
- Select the Network page
= Enter the hostname field and press the "y" key, a "z" appears
- Select the keyboard page, select the "german" keyboard layout and apply
- Reboot
= Press the "y" key at the login prompt, a "y" appears
- Login with admin
- Enter the Network page and enter the hostname field
- Press the "y" key, a "y" appears

Comment 8 Fabian Deutsch 2012-04-16 18:45:31 UTC
Sorry for the above comment - pasted into the wrong tab.

Comment 9 Fabian Deutsch 2012-04-16 19:30:48 UTC
This has been tested upstream with the following patches:

http://gerrit.ovirt.org/#change,3570
http://gerrit.ovirt.org/#change,3590

Test procedure:
- Install node
- Enable cim and set a password in the TUI
- Press F2 to gain shell access
- Run the following commands (this is effectively nearly the same code path 
  as the service call downstream, we just need to get round systemd here):

- Test simple stop using
# /usr/libexec/ovirt-init-functions.sh stop_ovirt_cim && echo ok || echo fail
Stopping sblim-sfcb (via systemctl):                       [  OK  ]
ok
= No iptables output (the output is more service like on downstream, tbd)

- Now start the service using
# /usr/libexec/ovirt-init-functions.sh start_ovirt_cim && echo ok || echo fail
ok
= Starting (also more service like on downstream, tbd):

- Determin the status of the service using
# /usr/libexec/ovirt-init-functions.sh status_ovirt_cim && echo running || echo not running
running
= The output is correct (the service is running, also more service like on downstream, tbd)

- Restaring is also without iptables output (and also more service like on downstream, tbd);
# /usr/libexec/ovirt-init-functions.sh reload_ovirt_cim && echo ok || echo fail
Stopping sblim-sfcb (via systemctl):                       [  OK  ]
ok

Comment 13 Guohua Ouyang 2012-04-28 02:38:11 UTC
verified on rhevh-6.3-20120426.2 build:
1. ovirt-cim works well now.

[root@localhost admin]# service ovirt-cim status
ovirt-cim is running...
[root@localhost admin]# service ovirt-cim stop
Stopping ovirt-cim:                                        [  OK  ]
[root@localhost admin]# service ovirt-cim status
ovirt-cim is not running...
[root@localhost admin]# service ovirt-cim start
Starting ovirt-cim:                                        [  OK  ]
[root@localhost admin]# service ovirt-cim status
ovirt-cim is running...
[root@localhost admin]# iptables -L -n | grep 5989
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:5989 

2. 
$ wbemcli ein -noverify https://cim:redhat@10.66.11.120/root/virt:KVM_VirtualSystemManagementService

10.66.11.120:5989/root/virt:KVM_VirtualSystemManagementService.SystemCreationClassName="KVM_HostSystem",SystemName="localhost.localdomain",CreationClassName="KVM_VirtualSystemManagementService",Name="Management Service"

Comment 14 Mike Burns 2012-06-13 17:09:02 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No tech note needed -- internal build only

Comment 15 Stephen Gordon 2012-06-15 13:57:44 UTC
Deleted Technical Notes Contents.

Old Contents:
No tech note needed -- internal build only

Comment 17 errata-xmlrpc 2012-07-19 14:20:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0741.html