----- Original Message -----
> From: "Michael Mraka" <michael.mr...@redhat.com>
> To: spacewalk-devel@redhat.com
> Sent: Tuesday, March 4, 2014 9:16:07 AM
> Subject: Re: [Spacewalk-devel] [PATCH] 1070866 - spacewalk-repo-sync fails in 
> case both options --sync-kickstart and
> --url are specified.
> 
> % From b3be4347594e20a6833896057118b3e349eec1d9 Mon Sep 17 00:00:00 2001
> % From: Dimitar Yordanov <dyord...@redhat.com>
> % Date: Thu, 27 Feb 2014 16:45:55 +0100
> % Subject: [PATCH] 1070866 - sw-repo-sync fails to sync kickstart.
> %
> % ---
> %  backend/satellite_tools/reposync.py              | 4 +++-
> %  backend/satellite_tools/spacewalk-repo-sync.sgml | 2 +-
> %  2 files changed, 4 insertions(+), 2 deletions(-)
> %
> % diff --git a/backend/satellite_tools/reposync.py
> b/backend/satellite_tools/reposync.py
> % index d336a88..983612e 100644
> % --- a/backend/satellite_tools/reposync.py
> % +++ b/backend/satellite_tools/reposync.py
> % @@ -119,7 +119,9 @@ class RepoSync(object):
> %
> %                  if not self.no_errata:
> %                      self.import_updates(plugin, url)
> % -                if self.sync_kickstart:
> % +
> % +                # only for repos obtained from the DB
> % +                if self.sync_kickstart and repo_label:
> 
> Hi Dimi,
> 
> I think ignoring --sync-kickstart when --url is used is not a good
> solution (even if it's stated in man page). Better solution would
> be to require repo_label to be set on command line in such case.
> 
  
   Hi Michael,
     
     I was thinking about this solution as well, but at the end decided to 
stick to the solution with restricting kickstart sync only for repositories set 
from WebIU and obtained from the DB.
     My concerns about setting repo_label from CLI are several:
     1. The repo label is used to check if the kickstart is already synced.

       
         if rhnSQL.fetchone_dict("""
            select id
            from rhnKickstartableTree
            where org_id = :org_id and channel_id = :channel_id and label = 
:label
            """, org_id = self.channel['org_id'], channel_id = 
self.channel['id'], label = repo_label):
            print "Kickstartable tree %s already synced." % repo_label
            return
    
     2. The repo label is used to set the ks path:
         ks_path = 'rhn/kickstart/%s/%s' % ( self.channel['org_id'], repo_label 
)
  
     When a repository is set from WebUI is guaranteed that the repo label is 
unique.
     I have a feeling this will not be possible from CLI.
     
   Dimi    
> ...
> %          <listitem>
> % -            <para>Attempt to create kickstartable tree (distribution) if
> there is subdirectory images/pxeboot/ under repo's URL.</para>
> % +            <para>Attempt to create kickstartable tree (distribution) if
> there is subdirectory images/pxeboot/ under repo's URL. The option is
> ignored for repositories set from CLI via option [-u|--url].</para>
> %          </listitem>
> %      </varlistentry>
> %  </variablelist>
> 
> 
> Regards,
> 
> --
> Michael Mráka
> Satellite Engineering, Red Hat
> 
> _______________________________________________
> Spacewalk-devel mailing list
> Spacewalk-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-devel

-- 
Dimitar Yordanov
Systems Management QA
#satellite-qa

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to