On Tue, Feb 22, 2011 at 4:03 PM, Andrew Rankin <andrew(a)eiknet.com> wrote:
On Tue, Feb 22, 2011 at 3:57 PM, Scott Henson
<shenson(a)redhat.com> wrote:
> On Tue, 22 Feb 2011 14:15:17 -0500, Andrew Rankin <andrew(a)eiknet.com> wrote:
>> For your consideration:
>>
>> Added --sync-all option to cobbler replicate which forces all systems,
>> distros, profiles, repos and images to be synced without specifying
>> each individually. I find this quite useful when trying to
>> completely mirror one cobbler installation to another backup machine
>> in a HA situation.
>
> I don't think this will end up syncing any metadata across. I don't see
> where it actually transfers anything. I would think you would have to
> put in an else after the 'if not self.sync_all' that sets must include
> on everything so that it gets synced across.
>
> I'd also put in a --clobber to overwrite data on the local (slave) side
> if you are doing this for a complete mirror. This would ignore the ctime
> on entries and pull over the data regardless. That would cause cobblerd
> to do more work, but ensure that you are an exact copy of the remote
> (master) side.
>
> --
> Scott Henson
> Red Hat CIS Operator
> WVU Alum BSAE/BSME
>
Hey Scott -
Perhaps I missed it in my patch (let me verify), I'm doing the include
everything above (line 210) with a:
if self.sync_all:
for names in self.remote_dict[ot]:
self.must_include[ot][names] = 1
Andrew
Looks like it made it. It's effectively adding everything to
must_include and setting them to 1 so it'll sync, or am I missing a
step?
I end up with this output from the cli (names changed to protect the innocent):
remote names struct is {'profile': ['Centos5.5-x86_64',
'Centos4.8-x86_64', 'Centos5.5-x86_64-Workstation',
'Centos4.8-x86_64-Workstation'], 'repo': ['Centos5.5-x86_64'],
'image': [], 'system': ['workstation070',
'workstation449',
'workstation477', 'workstation048', 'workstation049',
'workstation040', 'workstation047', 'workstation250',
'workstation378', 'workstation165', 'workstation166',
'workstation167', 'workstation059', 'workstation058',
'server010',
'workstation057', 'workstation056', 'workstation168',
'workstation169', 'workstation256', 'workstation420',
'server154',
'server041', 'workstation171', 'workstation170',
'workstation028',
'workstation022', 'workstation025', 'workstation027',
'workstation414', 'workstation214', 'workstation412',
'workstation413', 'server147', 'workstation457',
'workstation450',
'workstation451', 'workstation036', 'server040',
'workstation415',
'workstation678', 'workstation409', 'workstation673',
'workstation407', 'workstation405', 'server177',
'server175',
'workstation451', 'server178', 'server179',
'workstation319',
'workstation051', 'workstation050', 'workstation008',
'workstation004', 'workstation002', 'workstation453',
'workstation454', 'server160', 'workstation015',
'server103',
'server102', 'server107', 'server106', 'server105',
'server104',
'server109', 'server108', 'workstation550', 'server189',
'server188',
'server020', 'workstation014', 'workstation017',
'workstation016',
'server183', 'server181', 'server180', 'server187',
'server186',
'server185', 'server184', 'workstation616',
'workstation617',
'workstation413', 'workstation065', 'workstation060',
'workstation061', 'workstation062'], 'distro':
['Centos5.5-x86_64',
'Centos4.8-x86_64']}
transfer list for distro is ['Centos5.5-x86_64', 'Centos4.8-x86_64']
transfer list for profile is ['Centos5.5-x86_64', 'Centos4.8-x86_64',
'Centos4.8-x86_64-Workstation', 'Centos5.5-x86_64-Workstation']
transfer list for system is ['workstation070', 'workstation449',
'workstation477', 'workstation048', 'workstation049',
'workstation040', 'workstation047', 'workstation250',
'workstation378', 'workstation165', 'workstation166',
'workstation167', 'workstation059', 'workstation058',
'server010',
'workstation057', 'workstation056', 'workstation168',
'workstation169', 'workstation256', 'workstation420',
'server154',
'workstation171', 'workstation170', 'workstation028',
'workstation022', 'workstation025', 'workstation027',
'workstation414', 'workstation214', 'workstation412',
'workstation413', 'workstation454', 'workstation457',
'workstation450', 'workstation451', 'workstation036',
'server040',
'server041', 'workstation678', 'workstation409',
'workstation673',
'workstation407', 'workstation405', 'server177',
'server175',
'workstation451', 'server178', 'server179',
'workstation319',
'workstation051', 'workstation050', 'workstation008',
'workstation004', 'workstation002', 'server147',
'workstation453',
'server160', 'server020', 'server103', 'server102',
'server107',
'server106', 'server105', 'server104', 'server109',
'server108',
'workstation550', 'server189', 'server188',
'workstation015',
'workstation014', 'workstation017', 'workstation016',
'server183',
'server181', 'server180', 'server187', 'server186',
'server185',
'server184', 'workstation415', 'workstation616',
'workstation617',
'workstation413', 'workstation065', 'workstation060',
'workstation061', 'workstation062']
transfer list for repo is ['Centos5.5-x86_64']
transfer list for image is []
Andrew