Bug 1243341
Summary: | It hasn't show error info when failed to start virt-who service | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Liushihui <shihliu> |
Component: | virt-who | Assignee: | Radek Novacek <rnovacek> |
Status: | CLOSED ERRATA | QA Contact: | xingge <gxing> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.2 | CC: | gxing, hsun, ldai, lmiksik, ovasik, sgao, tlavigne |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | virt-who-0.14-8.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 11:56:30 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
Liushihui
2015-07-15 09:15:15 UTC
I do see the error message in the `systemctl status virt-who` output: ● 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 Čt 2015-07-16 15:48:09 CEST; 2s ago Process: 6626 ExecStart=/usr/bin/virt-who (code=exited, status=1/FAILURE) Main PID: 6626 (code=exited, status=1/FAILURE) čec 16 15:48:09 rhel7.virt systemd[1]: Started Daemon for reporting virtual guest IDs to subscription-manager. čec 16 15:48:09 rhel7.virt systemd[1]: Starting Daemon for reporting virtual guest IDs to subscription-manager... čec 16 15:48:09 rhel7.virt python[6626]: Password can't be decrypted, possibly corrupted čec 16 15:48:09 rhel7.virt systemd[1]: virt-who.service: main process exited, code=exited, status=1/FAILURE čec 16 15:48:09 rhel7.virt systemd[1]: Unit virt-who.service entered failed state. čec 16 15:48:09 rhel7.virt systemd[1]: virt-who.service failed. If you mean that it should be display after 'systemctl start virt-who`, that's not possible as systemd doesn't allow that. It just triggers the restart and doesn't check the status of that service. You have to use the `status` command to make sure that the service started successfully. Radek, Thanks for your explain. I means it should show remind info when failed to start virt-who service, thesefore, customers can track virt-who's status directly. For example, when it failed to start nfs service ,it will show these remind info as the following. Therefore, I hope virt-who also can show these info when failed to start virt-who service. is that acceptable? [root@hp-z220-05 ~]# systemctl restart nfs Job for nfs-server.service failed because control process exited with error code. See "systemctl status nfs-server.service" and "journalctl -xe" for details. Fixed in virt-who-0.14-5.el7. It still exist on virt-who-0.14-7.el7.noarch since virt-who still can't show error info when failed to start virt-who service. Therefore, reopen it. [root@hp-z220-05 ~]# rpm -q virt-who virt-who-0.14-7.el7.noarch Do the bug's description,then restart virt-who service, it still can't show error info in terminal side. I hope it can show the similar remind info as comment 3. [root@hp-z220-06 ~]# systemctl restart virt-who ==========It should remind failed to start 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:38:36 CST; 24s ago Process: 17087 ExecStart=/usr/bin/virt-who (code=exited, status=1/FAILURE) Main PID: 17087 (code=exited, status=1/FAILURE) Sep 06 11:38:36 hp-z220-06.qe.lab.eng.nay.redhat.com systemd[1]: Started Daemon for reporting virtual guest IDs to subscription-manager. Sep 06 11:38:36 hp-z220-06.qe.lab.eng.nay.redhat.com systemd[1]: Starting Daemon for reporting virtual guest IDs to subscription-manager... Sep 06 11:38:36 hp-z220-06.qe.lab.eng.nay.redhat.com virt-who[17087]: 2015-09-06 11:38:36,621 ERROR: [Errno 2] No such file or directory: '/var/lib/virt-who/key' Sep 06 11:38:36 hp-z220-06.qe.lab.eng.nay.redhat.com python[17087]: [Errno 2] No such file or directory: '/var/lib/virt-who/key' Sep 06 11:38:36 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:38:36 hp-z220-06.qe.lab.eng.nay.redhat.com systemd[1]: Unit virt-who.service entered failed state. Sep 06 11:38:36 hp-z220-06.qe.lab.eng.nay.redhat.com systemd[1]: virt-who.service failed. Ah, I forgot to change systemd service type to `notify`. *** Bug 1263119 has been marked as a duplicate of this bug. *** *** Bug 1263093 has been marked as a duplicate of this bug. *** Fixed in virt-who-0.14-8.el7. Verified it virt-who-0.14-8.el7.noarch since virt-who can show error log in terminal side when failed to start virt-who service. Therefore, verify it. Verified 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 Verified process: Case1: If there isn't key, it will show error info after restart virt-who service. 1. Register rhel to Satellite. 2. Configure virt-who with encrypted password, and decrypted password doesn't exist. [root@hp-z220-06 virt-who.d]# cat /etc/virt-who.d/virt-who [test-esx1] type=esx server=10.66.79.27 username=Administrator encrypted_password=43f282d679adb816f2bb1cf9c18949ec owner=ACME_Corporation env=Library 3. Restart virt-who service [root@hp-z220-06 virt-who.d]# systemctl start virt-who Job for virt-who.service failed because the control process exited with error code. See "systemctl status virt-who.service" and "journalctl -xe" for details. [root@lenovo-x3850-02 ~]# 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 Fri 2015-09-18 01:49:55 EDT; 26s ago Process: 78355 ExecStart=/usr/bin/virt-who (code=exited, status=1/FAILURE) Main PID: 78355 (code=exited, status=1/FAILURE) Status: "virt-who can't be started: [Errno 2] No such file or directory: '/var/lib/virt-who/key'" Case2: If OWNER or ENV hasn't been configured, it will show error info after restart virt-who. 1. Register system to SAM. 2. Configure virt-who run at esx mode and configure "VIRTWHO_ESX_OWNER" or "VIRTWHO_ESX_ENV" to null. # grep -v "^#" /etc/sysconfig/virt-who VIRTWHO_BACKGROUND=1 VIRTWHO_DEBUG=1 VIRTWHO_INTERVAL=5 VIRTWHO_ESX=1 VIRTWHO_ESX_OWNER= VIRTWHO_ESX_ENV=Library VIRTWHO_ESX_SERVER=10.66.78.2 VIRTWHO_ESX_USERNAME=administrator VIRTWHO_ESX_PASSWORD=qwer1234P! 3. Restart virt-who service and check virt-who's log [root@hp-z220-05 ~]# systemctl restart virt-who [root@lenovo-x3850-02 ~]# systemctl restart virt-who Job for virt-who.service failed because the control process exited with error code. See "systemctl status virt-who.service" and "journalctl -xe" for details. [root@lenovo-x3850-02 ~]# 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 Fri 2015-09-18 01:55:55 EDT; 43s ago Process: 78373 ExecStart=/usr/bin/virt-who (code=exited, status=1/FAILURE) Main PID: 78373 (code=exited, status=1/FAILURE) Status: "virt-who can't be started: Option --esx-owner (or VIRTWHO_ESX_OWNER environment variable) needs to be set" 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 |