Bug 1254843
Summary: | virt-who still can work normally if no "env" option in /etc/virt-who.d/ config file | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Eko <hsun> |
Component: | virt-who | Assignee: | Radek Novacek <rnovacek> |
Status: | CLOSED ERRATA | QA Contact: | xingge <gxing> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | dazhang, gxing, hsun, ldai, lmiksik, ovasik, sgao, shihliu, tlavigne |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | virt-who-0.14-9.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 11:57:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Eko
2015-08-19 03:22:54 UTC
Fixed in virt-who-0.14-5.el7. Verified it on virt-who-0.14-7.el7.noarch since virt-who won't start when env isn't exist. Therefore, verify it. Verified version: virt-who-0.14-7.el7.noarch subscription-manager-1.15.9-7.el7.x86_64 python-rhsm-1.15.4-4.el7.x86_64 Verified process: 1. Register system to stage candlepin 2. Configure virt-who run at esx mode and "env" isn't exist. [root@hp-z220-06 ~]# cat /etc/virt-who.d/virt [test-esx] type=esx server=10.66.78.2 username=administrator password=qwer1234P! owner=7652501 3. Restart virt-who service and check virt-who's log [root@hp-z220-06 ~]# systemctl restart virt-who [root@hp-z220-06 ~]# systemctl status virt-who ● virt-who.service - Daemon for reporting virtual guest IDs to subscription-manager Loaded: loaded (/usr/lib/systemd/system/virt-who.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2015-09-06 11:27:11 CST; 52s ago Process: 16581 ExecStart=/usr/bin/virt-who (code=exited, status=1/FAILURE) Main PID: 16581 (code=exited, status=1/FAILURE) Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com virt-who[16581]: File "/usr/share/virt-who/config.py", line 96, in checkOptions Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com virt-who[16581]: raise InvalidOption("Option `env` needs to be set in config `%s`" % (self.name)) Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com virt-who[16581]: InvalidOption: Option `env` needs to be set in config `test-rhevm1` Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com python[16581]: Fatal error: Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com python[16581]: Fatal error: Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com virt-who[16581]: Fatal error: Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com virt-who[16581]: Option `env` needs to be set in config `test-rhevm1` Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com systemd[1]: virt-who.service: main process exited, code=exited, status=1/FAILURE Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com systemd[1]: Unit virt-who.service entered failed state. Sep 06 11:27:11 hp-z220-06.qe.lab.eng.nay.redhat.com systemd[1]: virt-who.service failed. [root@hp-z220-06 ~]# tail -f /var/log/rhsm/rhsm.log 2015-09-06 11:24:28,027 [ERROR] @virtwho.py:304 - Sending data failed 5 times, report skipped 2015-09-06 11:27:11,278 [ERROR] @virtwho.py:747 - Fatal error: Traceback (most recent call last): File "/usr/share/virt-who/virtwho.py", line 741, in <module> main() File "/usr/share/virt-who/virtwho.py", line 670, in main virtWho = VirtWho(logger, options) File "/usr/share/virt-who/virtwho.py", line 130, in __init__ self.configManager = ConfigManager(self.logger, config_dir, smType=options.smType) File "/usr/share/virt-who/config.py", line 352, in __init__ self._readConfig(parser) File "/usr/share/virt-who/config.py", line 359, in _readConfig config.checkOptions(self.smType, self.logger) File "/usr/share/virt-who/config.py", line 96, in checkOptions raise InvalidOption("Option `env` needs to be set in config `%s`" % (self.name)) InvalidOption: Option `env` needs to be set in config `test-rhevm1` if set the type to libvirt mode and them delete the env option, this issue still can be duplicated. on the other hand, if set an wrong env, the mapping info still can be updated to server, there is bug about it: https://bugzilla.redhat.com/show_bug.cgi?id=1235980 Eko, do you mean that virt-who should show warning when `env` option is supplied in local libvirt mode? hi radek, When we create a config file in /etc/virt-who.d/, there are three testcases to verify the env option 1). a right env value [pass] 2). an wrong env value [failed] virt-who shouldn't work normally with an wrong env value, such as: [test-libvirt] type=libvirt server=10.66.129.10 username=root password=redhat owner=7661967 env=xxxxxxx 3). no env option [failed] if there is no env option in config file, virt-who should not work as comment4, but I checked this for libvirt remote mode as following cinfig, virt-who still can work normally, no any warning or error message like comment4 [test-libvirt] type=libvirt server=10.66.129.10 username=root password=redhat owner=7661967 *** Bug 1263093 has been marked as a duplicate of this bug. *** The fis for this issue is applied upstream. Fixed in virt-who-0.14-8.el7. It still exist on virt-who-0.14-8.el7.noarch. If virt-who run at remote libvirt mode and fake mode, virt-who still can sent h/g mapping to server when env or owner have not been configured in /etc/virt-who.d/XXX. The phenomenon is the same as comment 7, Therefore, reopen it. Checked version: virt-who-0.14-8.el7.noarch subscription-manager-1.15.9-10.el7.x86_64 python-rhsm-1.15.4-5.el7.x86_64 *** Bug 1263119 has been marked as a duplicate of this bug. *** Fixed in virt-who-0.14-9.el7. check this issue on virt-who-0.14-9.el7 if no env or owner, fake mode still can send the mapping info remote libvirt mode [ok] esx mode [ok] In the fake mode, it depends on the is_hypervisor option. If is_hypervisor is true, virt-who should require env and owner options. If is_hypervisor is false, the env and owner options are not used and warning should be printed. Can you please check if virt-who behaves as I described? Verified it on virt-who-0.14-9.el7 since virt-who can check env and owner when is_hypervisor=true. Therefore, verify it. It is true. when virt-who run at fake mode, if is_hypervisor=True, virt-who will check env and owner. 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. https://rhn.redhat.com/errata/RHBA-2015-2370.html |