Bug 1036710 - HA agent should behave appropriately when newer metadata is encountered
Summary: HA agent should behave appropriately when newer metadata is encountered
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-ha
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.3.0
Assignee: Greg Padgett
QA Contact: Artyom
URL:
Whiteboard: sla
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-02 13:59 UTC by Greg Padgett
Modified: 2016-06-12 23:16 UTC (History)
7 users (show)

Fixed In Version: ovirt-hosted-engine-ha-0.1.0-0.8.rc.el6ev
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-21 16:51:48 UTC
oVirt Team: SLA
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:0080 0 normal SHIPPED_LIVE new package: ovirt-hosted-engine-ha 2014-01-21 21:00:07 UTC
oVirt gerrit 21912 0 None None None Never

Description Greg Padgett 2013-12-02 13:59:05 UTC
Description of problem:
Future HA agents may use metadata that's incompatible with the current agents.  The current and new agents should handle this case, which requires some modifications in the current agent.

This will be a change in the code that will affect operation only if newer metadata is on the shared storage, but otherwise won't affect HA behavior.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Greg Padgett 2013-12-03 14:24:29 UTC
Merged Change-Id: I2357ce26aeb20439dec161c7b8ee46d94a4b3e3d

Comment 3 Artyom 2013-12-08 09:25:58 UTC
Please provide correct information for bug reproducing.
Thanks

Comment 4 Greg Padgett 2013-12-09 17:22:41 UTC
2 parts of this can be tested now:
a) the agent should function normally with this fix (i.e. no false "metadata too new" errors)
b) the agent should stop if newer metadata is encountered.

For part b, you need to fake some newer metadata:

1) Identify the path to the shared storage holding the engine vm (it should be in the agent log file, or derived from /etc/ovirt-hosted-engine/engine.conf)

2) Write a byte representing a newer version to the file.
   Note 1: You want to do this in a blank metadata slot, so the seek= argument should equal (4096 * (max_host_id + 1)).  I.e. if you have 2 hosts, host_id 1 and 2, you'd seek 12288 bytes.
   Note 2: The file below should already exist; if not, check your sd path
   Note 3: The "echo -n '3'" always uses 3... no relation to host ids
Use the value from above and run the command below, all one line, to fake some newer metadata:

echo -n '3' | dd conv=notrunc of=/<path to domain>/ha_agent/hosted-engine.metadata bs=1 count=1 seek=<your offset, e.g. 12288>

Any running agents should shortly start displaying log messages that they are no longer performing any actions on the engine VM because a newer agent/metadata was detected.

When done, you can remove the spoofed metadata version using the following, substituting as necessary to match your command above:

dd conv=notrunc if=/dev/zero of=/<path to domain>/ha_agent/hosted-engine.metadata bs=1 count=1 seek=<your offset, e.g. 12288>

Comment 5 Artyom 2013-12-12 14:52:27 UTC
Verified on ovirt-hosted-engine-ha-0.1.0-0.8.rc.el6ev.noarch
1) No errors of type metadata too new
2) After updating metadata, vm shutdown and I have message in log "Local agent has been superseded by newer agents running in this cluster"

Comment 6 errata-xmlrpc 2014-01-21 16:51:48 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/RHEA-2014-0080.html


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