Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 11 months ago

Closed 9 months ago

Last modified 9 months ago

#11588 closed Patch - Bug Fix (fixed)

Patch: housekeeping upgrade conflicts when hostnames contain dashes

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

Description

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@…> 11 months ago.
housekeeping.schema.1310.sql (590 bytes) - added by Bill Meek <keemllib@…> 11 months ago.
version.txt (802 bytes) - added by Bill Meek <keemllib@…> 11 months ago.
v0.27-pre2-1393-geae3c34-dirty
housekeeping.upgrade.patch.v0 (605 bytes) - added by Bill Meek <keemllib@…> 11 months ago.

Download all attachments as: .zip

Change History (9)

Changed 11 months ago by Bill Meek <keemllib@…>

Changed 11 months ago by Bill Meek <keemllib@…>

Changed 11 months ago by Bill Meek <keemllib@…>

v0.27-pre2-1393-geae3c34-dirty

Changed 11 months ago by Bill Meek <keemllib@…>

comment:1 Changed 9 months ago by paulh

  • Owner set to wagnerrp
  • Priority changed from minor to blocker
  • Status changed from new to assigned

comment:2 Changed 9 months ago by wagnerrp

  • Milestone changed from unknown to 0.27
  • Status changed from assigned to accepted

comment:3 Changed 9 months ago by Bill Meek <keemllib@…>

  • Resolution set to fixed
  • Status changed from accepted to closed

In 443be22ac19bdcd2495b184b46f03aae12909298/mythtv:

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

Fixes #11588

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

comment:4 Changed 9 months ago by Raymond Wagner <rwagner@…>

In b72870d585b33d8398e5824c0975ca2d022b6ce8/mythtv:

Fix housekeeping schema update.

Refs #11588

comment:5 Changed 9 months ago by Raymond Wagner <rwagner@…>

In b108206b47afca3c3a11fc740524c93daefe9b67/mythtv:

Fix typo in housekeeper schema update

Refs #11588

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.