Bug 730066 - matahari-host custom uuid problems
Summary: matahari-host custom uuid problems
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: matahari
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andrew Beekhof
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-11 17:06 UTC by Dave Johnson
Modified: 2011-12-06 11:39 UTC (History)
3 users (show)

Fixed In Version: matahari-0.4.2-7.el6
Doc Type: Bug Fix
Doc Text:
No description required
Clone Of:
Environment:
Last Closed: 2011-12-06 11:39:46 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1569 normal SHIPPED_LIVE matahari bug fix and enhancement update 2011-12-06 00:39:06 UTC

Description Dave Johnson 2011-08-11 17:06:32 UTC
Description of problem:
=======================
Playing around with the set_uuid and get_uuid matahari-host methods I found some issues that are most likely related.  

1) When custom uuid has not been set and is set for the first time, 'call 1 get_uuid Custom' would display the value but displaying the properties after re-querying the agent still shows 'not-available' for the custom_uuid host property
2) When the custom uuid is already set and then a new value is set to overwrite the original value, get uuid will not display the new value, and re-querying the agent still shows 'not-available' for the custom_uuid host property

It is not until you restart the host agent that the custom uuid is displayed in the host properties and if #2 above, is the correct uuid displayed when calling get_uuid Custom. 

3) Also noticed that at least the custom lifetime is case sensitive.


Version-Release number of selected component (if applicable):
=============================================================
matahari-host-0.4.2-5.el6.x86_64

How reproducible:
=================
100%

Steps to Reproduce:
===================
1.  install/start matahari broker and agent
2.  with qmf-tool, repeat the steps below

  
qmf: show 1
Properties:
    Name                Value
    ===============================================================================================================================================================
    load                {'1': 0.0, '5': 0.0, '15': 0.0}
    hostname            
    last_updated        1313081653000000000
    free_swap           2064376
    sequence            6
    free_mem            750060
    os                  Linux (2.6.32-178.el6.x86_64)
    process_statistics  {'running': 1, 'sleeping': 90, 'zombie': 0, 'idle': 0, 'stopped': 0, 'total': 91}
    cpu_count           1
    cpu_model           QEMU Virtual CPU version 0.11.0
    cpu_cores           1
    wordsize            64
    swap                2064376
    custom_uuid         not-available         <----------------------
    memory              1019040
    update_interval     5
    cpu_flags           fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm up unfair_spinlock pni hypervisor
    arch                x86_64
    uuid                b113dab288ebd615a74fa1e700000011

# Set it
qmf: call 1 set_uuid Custom zzzzdab288ebd615a74fa1e7
Output Parameters:
    Name  Value
    =============
    rc    0
qmf: call 1 get_uuid Custom
Output Parameters:
    Name  Value
    ================================
    uuid  zzzzdab288ebd615a74fa1e7

# reset it, old value still displays on get
qmf: call 1 set_uuid Custom djdjdj615a74fa1e700000
Output Parameters:
    Name  Value
    =============
    rc    0
qmf: call 1 get_uuid Custom
Output Parameters:
    Name  Value
    ================================
    uuid  zzzzdab288ebd615a74fa1e7    <---- wrong, should be djdjdj......


# requery the h
qmf: query Host org.matahariproject
Data Objects Returned: 1:
    Number  Data Address
    ==============================================
    2       32c5ab27-0ac7-4dff-9a1d-1d7725d66c6b
qmf: show 2
Properties:
    Name                Value
    ===============================================================================================================================================================
    load                {'1': 0.0, '5': 0.0, '15': 0.0}
    hostname            
    last_updated        1313081743000000000
    free_swap           2064376
    sequence            24
    free_mem            749820
    os                  Linux (2.6.32-178.el6.x86_64)
    process_statistics  {'running': 1, 'sleeping': 90, 'zombie': 0, 'idle': 0, 'stopped': 0, 'total': 91}
    cpu_count           1
    cpu_model           QEMU Virtual CPU version 0.11.0
    cpu_cores           1
    wordsize            64
    swap                2064376
    custom_uuid         not-available    <-------------  wrong
    memory              1019040
    update_interval     5
    cpu_flags           fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm up unfair_spinlock pni hypervisor
    arch                x86_64
    uuid                b113dab288ebd615a74fa1e700000011


# lifetime is case sensitive
qmf: call 1 get_uuid Custom
Output Parameters:
    Name  Value
    ================================
    uuid  zzzzdab288ebd615a74fa1e7
qmf: call 1 get_uuid custom
Output Parameters:
    Name  Value
    ========================
    uuid  invalid-lifetime

Comment 2 Andrew Beekhof 2011-08-15 06:26:41 UTC
A related patch has been committed upstream: https://github.com/beekhof/matahari/commit/6b5df25

Comment 4 Dave Johnson 2011-08-17 14:48:25 UTC
I am still seeing the same issues in v0.4.2-6

Comment 5 Andrew Beekhof 2011-08-18 04:16:37 UTC
The get/set uuid calls work (see below) but you are correct that the property is not updated.

qmf: call 2 get_uuid Custom
Output Parameters:
    Name  Value
    ====================
    uuid  hi-there-man
qmf: call 2 set_uuid Custom hi-there-again
Output Parameters:
    Name  Value
    =============
    rc    0
qmf: call 2 get_uuid Custom
Output Parameters:
    Name  Value
    ======================
    uuid  hi-there-again

Comment 6 Andrew Beekhof 2011-08-18 04:27:13 UTC
A related patch has been committed upstream: https://github.com/beekhof/matahari/commit/d265e05

Comment 7 Andrew Beekhof 2011-08-18 04:33:33 UTC
With the above patch it works, but testing is non-obvious.
Calling set_uuid changes the Host object and one must re-query to get the new one.
Eg.  
# show 1
# call 1 set_uuid blah
# query Host org.matahariproject
# show 2

See full transcript below for details.


[root@pcmk-1 ~]# qmf-tool localhost:49000
Management Tool for QMF
qmf: set default 2
Default Agent: matahariproject.org:host:4fe4d46e-83b9-46fc-aabf-a4a373b7a164
qmf: query Host org.matahariproject
Data Objects Returned: 1:
    Number  Data Address
    ==============================================
    1       5bcaf6ac-97c9-47c3-b281-d6f1fb9b0a66
qmf: show 1
Properties:
    Name                Value
    ==========================================================
    load                {'1': 0.089999999999999997, '5': 0.11, '15': 0.050000000000000003}
    hostname            pcmk-1
    last_updated        1313622133000000000
    free_swap           1015800
    sequence            6
    free_mem            354072
    os                  Linux (2.6.32-131.0.15.el6.x86_64)
    process_statistics  {'running': 1, 'sleeping': 78, 'zombie': 0, 'idle': 0, 'stopped': 0, 'total': 79}
    cpu_count           1
    cpu_model           QEMU Virtual CPU version 0.11.0
    cpu_cores           1
    wordsize            64
    swap                1015800
    custom_uuid         hi-there-again
    memory              501724
    update_interval     5
    cpu_flags           fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm up rep_good unfair_spinlock pni hypervisor
    arch                x86_64
    uuid                2fa820fba867ba14eec5b99a0000000e
qmf: call 1 set_uuid Custom hi-there-fred
Output Parameters:
    Name  Value
    =============
    rc    0
qmf: show 1
Properties:
    Name                Value
    ========================================================
    load                {'1': 0.089999999999999997, '5': 0.11, '15': 0.050000000000000003}
    hostname            pcmk-1
    last_updated        1313622133000000000
    free_swap           1015800
    sequence            6
    free_mem            354072
    os                  Linux (2.6.32-131.0.15.el6.x86_64)
    process_statistics  {'running': 1, 'sleeping': 78, 'zombie': 0, 'idle': 0, 'stopped': 0, 'total': 79}
    cpu_count           1
    cpu_model           QEMU Virtual CPU version 0.11.0
    cpu_cores           1
    wordsize            64
    swap                1015800
    custom_uuid         hi-there-again
    memory              501724
    update_interval     5
    cpu_flags           fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm up rep_good unfair_spinlock pni hypervisor
    arch                x86_64
    uuid                2fa820fba867ba14eec5b99a0000000e
qmf: query Host org.matahariproject
Data Objects Returned: 1:
    Number  Data Address
    ==============================================
    2       5bcaf6ac-97c9-47c3-b281-d6f1fb9b0a66
qmf: show 2
Properties:
    Name                Value
    ====================================================================================================
    load                {'1': 0.059999999999999998, '5': 0.10000000000000001, '15': 0.040000000000000001}
    hostname            pcmk-1
    last_updated        1313622163000000000
    free_swap           1015800
    sequence            12
    free_mem            353824
    os                  Linux (2.6.32-131.0.15.el6.x86_64)
    process_statistics  {'running': 1, 'sleeping': 78, 'zombie': 0, 'idle': 0, 'stopped': 0, 'total': 79}
    cpu_count           1
    cpu_model           QEMU Virtual CPU version 0.11.0
    cpu_cores           1
    wordsize            64
    swap                1015800
    custom_uuid         hi-there-fred
    memory              501724
    update_interval     5
    cpu_flags           fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm up rep_good unfair_spinlock pni hypervisor
    arch                x86_64
    uuid                2fa820fba867ba14eec5b99a0000000e
qmf:

Comment 9 Dave Johnson 2011-08-29 16:13:14 UTC
good 2 go in v0.4.2-9

Comment 10 Russell Bryant 2011-11-16 21:41:13 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 description required

Comment 11 errata-xmlrpc 2011-12-06 11:39:46 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-2011-1569.html


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