Pradeep Kilambi wrote:
Miroslav Suchý wrote:
Pradeep Kilambi wrote:
Looking at your commit:

http://git.fedoraproject.org/git/?p=spacewalk.git;a=commitdiff;h=c587ddb52000ea2ec2635bccf6729cdf7f6dc0a2

You're missing the fact that even with CFG.ISS_PARENT set, we can still talk to RHN with my commandline url options. Which means you'll be raising an iss error even when you're communicating with hosted. Which is incorrect. Please fix this appropriately so we check the right condition. Just checking the iss_parent flag wont suffice.

According to backend/satellite_tools/satsync.py line 2127:
    CFG.set("ISS_PARENT", OPTIONS.iss_parent or CFG.ISS_PARENT)
I thought that CFG.ISS_PARENT is set to value in configuration file and overridden with command line option. Am I missing something?


iss_parent flag is overridden only when you want to override iss_parent option while talking to another satllite/sw. When you're connecting to RHN, you'll be using server option. In which case, your iss_parent is intact. So, you're now in a situation where your iss_parent is set in the config but you're connecting to hosted through options.server and that takes precedence. Which is a valid scenario, so you'll need to take that into account before throwing specific exceptions.

~ Prad

Around line 412:
            if CFG.ISS_PARENT:
                url = self.xmlWireServer.schemeAndUrl(CFG.ISS_PARENT)
            else:
                url = self.xmlWireServer.schemeAndUrl(CFG.RHN_PARENT)
            log(1, ['Red Hat Network Satellite - live synchronization',
                    '   url: %s' % url,
                    '   debug/output level: %s' % CFG.DEBUG])
            if CFG.ISS_PARENT:
                self.xmlWireServer.setServerHandler(isIss=1)
            else:
                self.xmlWireServer.setServerHandler()

So if CFG.ISS_PARENT is set, we are not connecting to CFG.RHN_PARENT (which is populated by OPTIONS.server)...
So if we want to make your scenario working, we should replace:
  CFG.set("ISS_PARENT", OPTIONS.iss_parent or CFG.ISS_PARENT)
with:
  if OPTIONS.server:
     CFG.set("ISS_PARENT", None)
  else:
     CFG.set("ISS_PARENT", OPTIONS.iss_parent or CFG.ISS_PARENT)

Question is: do we want this behavior?


--
Miroslav Suchy
RHN Satellite Engineering, Red Hat

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to