Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#11588 closed Patch - Bug Fix (fixed)

Patch: housekeeping upgrade conflicts when hostnames contain dashes

Reported by: Bill Meek <keemllib@…> Owned by: Raymond Wagner
Priority: blocker Milestone: 0.27
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


changeset:463953f upgrades mythconverg from DBSchemaVer 1310 to 1311.

Upgrade failure case:

Full backend log addached, but the failure was:

Duplicate entry 'JobQueueRecover-mc1' for key 'task'

My host is 'mc0' and my test platform ('mc1') can be run as a slave to it, and is named 'slave-mc1'.

Unfortunately, the slave was initially named 'mc1'.

Full dump of housekeeping before the upgrade is attached, but the failure is generated because of these two entries:

('JobQueueRecover-mc1','2013-03-07 00:02:53')
('JobQueueRecover-slave-mc1','2013-05-10 22:19:05');

Attempts to re-run the upgrade result in failures due to the oldhousekeeping table already existing.

Since the failure was caused by the last two lines in the existing table, all of the other entries were converted to the new format successfully.

Users with (non-host-matching) dashes case:

Users with -'s in their hostnames (or profile IDs) would have their housekeeping entries truncated. So, mythtv-backend would become just backend.

The patch is untested (but it compiles OK,) and the following were done on mysql 5.5.31.

SELECT RIGHT('abc-def-xyz', LENGTH('abc-def-xyz') - LENGTH(SUBSTRING_INDEX('abc-def-xyz', '-', 1)) -1);
SELECT RIGHT('abc-defxyz', LENGTH('abc-defxyz') - LENGTH(SUBSTRING_INDEX('abc-defxyz', '-', 1)) -1);

SELECT SUBSTRING('abc-def-ghi' FROM LENGTH(SUBSTRING_INDEX('abc-def-ghi', '-', 1)) +2);
SELECT SUBSTRING('abc-defghi' FROM LENGTH(SUBSTRING_INDEX('abc-defghi', '-', 1)) +2);

Returns: def-xyz and defxyz respectively.

Attachments (4)

mythbackend.20130610151345.7254.log (5.3 KB) - added by Bill Meek <keemllib@…> 8 years ago.
housekeeping.schema.1310.sql (590 bytes) - added by Bill Meek <keemllib@…> 8 years ago.
version.txt (802 bytes) - added by Bill Meek <keemllib@…> 8 years ago.
housekeeping.upgrade.patch.v0 (605 bytes) - added by Bill Meek <keemllib@…> 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by Bill Meek <keemllib@…>

Changed 8 years ago by Bill Meek <keemllib@…>

Changed 8 years ago by Bill Meek <keemllib@…>

Attachment: version.txt added


Changed 8 years ago by Bill Meek <keemllib@…>

comment:1 Changed 8 years ago by paulh

Owner: set to Raymond Wagner
Priority: minorblocker
Status: newassigned

comment:2 Changed 8 years ago by Raymond Wagner

Milestone: unknown0.27
Status: assignedaccepted

comment:3 Changed 7 years ago by Bill Meek <keemllib@…>

Resolution: fixed
Status: acceptedclosed

In 443be22ac19bdcd2495b184b46f03aae12909298/mythtv:

Fix Housekeeper schema update to handle hostnames with dashes (-)

Fixes #11588

Signed-off-by: Raymond Wagner <rwagner@…>

comment:4 Changed 7 years ago by Raymond Wagner <rwagner@…>

In b72870d585b33d8398e5824c0975ca2d022b6ce8/mythtv:

Fix housekeeping schema update.

Refs #11588

comment:5 Changed 7 years ago by Raymond Wagner <rwagner@…>

In b108206b47afca3c3a11fc740524c93daefe9b67/mythtv:

Fix typo in housekeeper schema update

Refs #11588

Note: See TracTickets for help on using tickets.