Opened 11 years ago

Closed 11 years ago

#6255 closed patch (fixed)

Fix Storage Group fallback to work for non-Default SG's

Reported by: sphery <mtdean@…> Owned by: cpinkham
Priority: minor Milestone: unknown
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

If a StorageGroup? object is created by specifying both groupname and hostname, the fallback used when no matching directories is found is to go as:

  • groupname+hostname
  • "Default"+hostname
  • "Default"+""

The attached patch modifies the fallback to go as:

  • groupname+hostname
  • groupname+""
  • "Default"+hostname
  • "Default"+""

Therefore, it simply adds one more check to find the StorageGroup? with a matching name regardless of hostname (i.e. as defined by all other hosts).

Currently, we require all non-Default SG's to be defined on the master /and/ overridden on every host (else the Default SG will be used on other hosts). After this patch, SG's may be defined on the master backend and will only need to be overridden if the host's directory list differs from that specified by the master backend. Therefore, the patch modifies non-"Default" SG's to work just like the "Default" SG.

Attachments (1)

mythtv-6255-Storage_Group_fallback.patch (6.4 KB) - added by sphery <mtdean@…> 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by sphery <mtdean@…>

comment:1 Changed 11 years ago by cpinkham

Owner: changed from Isaac Richards to cpinkham
Status: newassigned

comment:2 Changed 11 years ago by cpinkham

Resolution: fixed
Status: assignedclosed

(In [20375]) Change the default StorageGroup? fallback code from:

groupname+hostname -> 'Default'+hostname -> 'Default'+

to:

groupname+hostname -> 'groupname'+ -> 'Default'+hostname -> 'Default'+

This makes the non-Default groupname fallback act the same way that the Default group fallback works.

Closes #6255 using patch by Michael T Dean.

comment:3 Changed 11 years ago by Stuart Auchterlonie

Resolution: fixed
Status: closednew

Post [20375] i've found a problem with this.

In my case my master backend only has a Default storage group defined. Another backend i've used in the past had a LiveTV SG defined.

With this change in place watching livetv from this backend causes the LiveTV SG from the other backend to be used.

This results in either

  1. My root FS filling up (if the directory is available) or
  2. Inability to start LiveTV which can only be deciphered by looking at the logs.

Stuart

comment:4 Changed 11 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [21236]) Modify the Storage Groups directory list fallback code to eliminate an issue with LiveTV fallback.

For normal recordings, the fallback order is this:

groupname+hostname -> groupname -> 'Default'+hostname -> 'Default'

For LiveTV, the fallback order is now reverted back to the original fallback order prior to [20375] which is:

groupname+hostname -> 'Default'+hostname -> 'Default'

Closes #6255.

Note: See TracTickets for help on using tickets.