RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1502821 - Enabling VIRTWHO_DISABLE_ASYNC breaks virt-who reporting
Summary: Enabling VIRTWHO_DISABLE_ASYNC breaks virt-who reporting
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-16 19:08 UTC by Chris Snyder
Modified: 2019-10-28 07:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:47:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github virt-who virt-who pull 102 0 None closed 1502821: Remove undocumented, broken env var "VIRTWHO_DISABLE_ASYNC" 2020-07-08 14:56:44 UTC
Red Hat Product Errata RHBA-2018:3169 0 None None None 2018-10-30 10:48:02 UTC

Description Chris Snyder 2017-10-16 19:08:32 UTC
Description of problem:

Using the environment variable 'VIRTWHO_DISABLE_ASYNC' causes virt-who to send data formatted for the synchronous hypervisor checkin API endpoint to the asynchronous hypervisor checkin API endpoint.

Version-Release number of selected component (if applicable):
versions of virt-who newer than (or equal to) virt-who-0.15-1 (including upstream master) 

How reproducible:
100%

Steps to Reproduce:
1) Start up candlepin master (or any version newer than or equal to 2.0)
2) Configure virt-who to report to that instance of Candlepin (example below)
3) `export VIRTWHO_DISABLE_ASYNC=1` (in the shell you're about to use to execute virt-who)
4) run virt-who: `./virt-who -o -d`
5) watch candlepin logs to see it blow up: `tail -f /var/log/candlepin/candlepin.log`


Example.conf:
"""
[fake_candle]
type=fake
file=/tmp/fake.json
is_hypervisor=True
owner=admin
env=admin
rhsm_hostname=localhost
rhsm_port=8443
rhsm_username=admin
rhsm_password=admin
rhsm_prefix=/candlepin
rhsm_insecure=1

"""

Contents of /tmp/fake.json:
"""
{
    "hypervisors": [
        {
            "uuid": "CSNYDER_TEST_HYPERVISOR_ID",
            "guests": [
                {
                    "guestId": "07ED8178-95D5-4244-BC7D-582A54A48FF8",
                    "state": 1,
                    "attributes": {
                        "active": 1,
                        "virtWhoType": "esx"
                    }
                }
            ]
        }
    ]
}
"""

Actual results:

Failure to perform the hypervisorUpdateJob (with a traceback like the following in /var/log/candlepin/candlepin.log):
"""
2017-10-16 14:34:52,027 [thread=QuartzScheduler_Worker-15] [job=hypervisor_update_24e9b6da-69b3-4951-9c76-a25ea63d21e3, org=, csid=] ERROR org.candlepin.util.Util - Could no de-serialize the following json {"CSN
YDER_TEST_HYPERVISOR_ID": [{"guestId": "07ED8178-95D5-4244-BC7D-582A54A48FF8", "state": 1, "attributes": {"active": 1, "virtWhoType": "esx"}}]}
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "CSNYDER_TEST_HYPERVISOR_ID" (class org.candlepin.pinsetter.tasks.HypervisorUpdateJob$HypervisorList), not marked as ignorable
 (2 known properties: "hypervisors", "consumers"])
 at [Source: {"CSNYDER_TEST_HYPERVISOR_ID": [{"guestId": "07ED8178-95D5-4244-BC7D-582A54A48FF8", "state": 1, "attributes": {"active": 1, "virtWhoType": "esx"}}]}; line: 1, column: 33] (through reference chain: o
rg.candlepin.pinsetter.tasks.HypervisorList["CSNYDER_TEST_HYPERVISOR_ID"])
        at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51) ~[jackson-databind-2.4.5.jar:2.4.5]
        at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:744) ~[jackson-databind-2.4.5.jar:2.4.5]
        at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:915) ~[jackson-databind-2.4.5.jar:2.4.5]
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1306) ~[jackson-databind-2.4.5.jar:2.4.5]
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1284) ~[jackson-databind-2.4.5.jar:2.4.5]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:243) ~[jackson-databind-2.4.5.jar:2.4.5]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118) ~[jackson-databind-2.4.5.jar:2.4.5]
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3066) ~[jackson-databind-2.4.5.jar:2.4.5]
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2161) ~[jackson-databind-2.4.5.jar:2.4.5]
        at org.candlepin.util.Util.fromJson(Util.java:378) ~[classes/:]
        at org.candlepin.pinsetter.tasks.HypervisorUpdateJob.toExecute(HypervisorUpdateJob.java:214) [classes/:]
        at org.candlepin.pinsetter.tasks.HypervisorUpdateJob$$EnhancerByGuice$$edffeb1.CGLIB$toExecute$1(<generated>) [guice-3.0.jar:]
        at org.candlepin.pinsetter.tasks.HypervisorUpdateJob$$EnhancerByGuice$$edffeb1$$FastClassByGuice$$af260766.invoke(<generated>) [guice-3.0.jar:]
        at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) [guice-3.0.jar:na]
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) [guice-persist-3.0.jar:na]
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
        at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) [guice-3.0.jar:na]
        at org.candlepin.pinsetter.tasks.HypervisorUpdateJob$$EnhancerByGuice$$edffeb1.toExecute(<generated>) [guice-3.0.jar:]
        at org.candlepin.pinsetter.tasks.KingpinJob.execute(KingpinJob.java:89) [classes/:]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.1.jar:na]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:na]
2017-10-16 14:34:52,028 [thread=QuartzScheduler_Worker-15] [job=hypervisor_update_24e9b6da-69b3-4951-9c76-a25ea63d21e3, org=, csid=] ERROR org.candlepin.pinsetter.tasks.HypervisorUpdateJob - HypervisorUpdateJob 
encountered a problem.
"""


Expected results:

I either expect this environment variable to be removed,
 OR 
to have it cause virt-who to report to the synchronous endpoint with properly formatted data when enabled.

Comment 1 Eko 2017-10-17 05:50:31 UTC
we never tested this variable before because there is no any documents included this feature, and also can't find it by "man virt-who" or "man virt-who-config", I agree to remove it.

Comment 6 errata-xmlrpc 2018-10-30 10:47:13 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.

https://access.redhat.com/errata/RHBA-2018:3169


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