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 1475227 - 'pool-build' event can not be listened by 'pool-event'
Summary: 'pool-build' event can not be listened by 'pool-event'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: jiyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-26 08:43 UTC by jiyan
Modified: 2018-05-15 10:34 UTC (History)
7 users (show)

Fixed In Version: libvirt-3.8.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 10:52:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1578337 0 unspecified CLOSED event-test.py gets traceback when pool-build or pool-delete 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHEA-2018:0704 0 None None None 2018-04-10 10:54:52 UTC

Internal Links: 1578337

Description jiyan 2017-07-26 08:43:42 UTC
Description of problem:
'pool-build' event can not be listened by 'pool-event'

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.9.0-16.el7_4.3.x86_64
kernel-3.10.0-693.el7.x86_64
libvirt-3.2.0-14.el7_4.2.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a xml file to define a pool
# cat pool.xml 
<pool type='dir'>
  <name>test</name>
  <capacity unit='bytes'>160982630400</capacity>
  <allocation unit='bytes'>63092301824</allocation>
  <available unit='bytes'>97890328576</available>
  <source>
  </source>
  <target>
    <path>/home/test</path>
    <permissions>
      <mode>0711</mode>
      <owner>0</owner>
      <group>0</group>
      <label>system_u:object_r:virt_image_t:s0</label>
    </permissions>
  </target>
</pool>

2.Define pool
Terminal 1:
# virsh pool-event --event lifecycle

Terminal 2:
# virsh pool-define pool.xml 
Pool test defined from pool.xml

Check Terminal 1:
# virsh pool-event --event lifecycle
event 'lifecycle' for storage pool test: Defined
events received: 1

3.Build pool
Terminal 1:
# virsh pool-event --event lifecycle

Terminal 2:
# virsh pool-build test
Pool test built

Check Terminal 1:
# virsh pool-event --event lifecycle
                   <--- nothing displayed

Actual results:
As step 3 shows.

Expected results:
'pool-build' should be listened by 'pool-event'

Additional info:

Comment 2 Michal Privoznik 2017-09-20 09:59:41 UTC
commit b06521928cca0b55987bdc49360f8d78a56feb04
Author:     Julio Faracco <jcfaracco>
AuthorDate: Sat Sep 9 12:09:49 2017 -0300
Commit:     Michal Privoznik <mprivozn>
CommitDate: Wed Sep 20 11:52:56 2017 +0200

    storage: Add new events for *PoolBuild() and *PoolDelete().
    
    This commit adds new events for two methods and operations: *PoolBuild() and
    *PoolDelete(). Using the event-test and the commands set below we have the
    following outputs:
    
    $ sudo ./event-test
    Registering event callbacks
    myStoragePoolEventCallback EVENT: Storage pool test Defined 0
    myStoragePoolEventCallback EVENT: Storage pool test Created 0
    myStoragePoolEventCallback EVENT: Storage pool test Started 0
    myStoragePoolEventCallback EVENT: Storage pool test Stopped 0
    myStoragePoolEventCallback EVENT: Storage pool test Deleted 0
    myStoragePoolEventCallback EVENT: Storage pool test Undefined 0
    
    Another terminal:
    $ sudo virsh pool-define test.xml
    Pool test defined from test.xml
    
    $ sudo virsh pool-build test
    Pool test built
    
    $ sudo virsh pool-start test
    Pool test started
    
    $ sudo virsh pool-destroy test
    Pool test destroyed
    
    $ sudo virsh pool-delete test
    Pool test deleted
    
    $ sudo virsh pool-undefine test
    Pool test has been undefined
    
    This commits can be a solution for RHBZ #1475227.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1475227
    
    Signed-off-by: Julio Faracco <jcfaracco>
    Signed-off-by: Michal Privoznik <mprivozn>

v3.7.0-136-gb06521928

Comment 4 jiyan 2017-10-11 09:50:45 UTC
Test env components:
kernel-3.10.0-731.el7.x86_64
libvirt-3.8.0-1.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.9.x86_64

Test scenario:
1.Prepare a xml file to define a pool
# cat pool.xml 
<pool type='dir'>
  <name>test</name>
  <capacity unit='bytes'>160982630400</capacity>
  <allocation unit='bytes'>63092301824</allocation>
  <available unit='bytes'>97890328576</available>
  <source>
  </source>
  <target>
    <path>/home/test</path>
    <permissions>
      <mode>0711</mode>
      <owner>0</owner>
      <group>0</group>
      <label>system_u:object_r:virt_image_t:s0</label>
    </permissions>
  </target>
</pool>

2.Define pool
Terminal 1:
# virsh pool-event --event lifecycle

Terminal 2:
# virsh pool-define pool.xml 
Pool test defined from pool.xml

Check Terminal 1:
# virsh pool-event --event lifecycle
event 'lifecycle' for storage pool test: Defined
events received: 1

3. Build pool
Terminal 1:
# virsh pool-event --event lifecycle
 
Terminal 2:
# virsh pool-build test
Pool test built

Check Terminal 1:
# virsh pool-event --event lifecycle
event 'lifecycle' for storage pool test: Created
events received: 1

4. Start pool
Terminal 1:
# virsh pool-event --event lifecycle
 
Terminal 2:
# virsh pool-start test
Pool test started

Check Terminal 1:
# virsh pool-event --event lifecycle
event 'lifecycle' for storage pool test: Started
events received: 1


5. Destroy pool
Terminal 1:
# virsh pool-event --event lifecycle
 
Terminal 2:
# virsh pool-destroy test
Pool test destroyed

Check Terminal 1:
# virsh pool-event --event lifecycle
event 'lifecycle' for storage pool test: Stopped
events received: 1

6. Delete pool
Terminal 1:
# virsh pool-event --event lifecycle

Terminal 2:
# virsh pool-delete test
Pool test deleted

Check Terminal 1:
# virsh pool-event --event lifecycle
event 'lifecycle' for storage pool test: Deleted
events received: 1

7. Undefine pool
Terminal 1:
# virsh pool-event --event lifecycle
 
Terminal 2:
# virsh pool-undefine test
Pool test has been undefined

Check Terminal 1:
# virsh pool-event --event lifecycle
event 'lifecycle' for storage pool test: Undefined
events received: 1

All the results are as expected, move this bug to be verified.

Comment 8 errata-xmlrpc 2018-04-10 10:52:40 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/RHEA-2018:0704


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