[Spacewalk-list] Switching from rhn-clone-errata to eva-direct-errata-sync

Paul Robert Marino prmarino1 at gmail.com
Fri Jan 4 21:15:07 UTC 2013


Yea I knew there was some reason I didn't add it before I had just
forgot about it.
but I they both have proxy support so thats not the reason
the actual reason is its an oddity in LWP's proxy support which is the
underlying transport for the Frontier::client module

first you need to make sure perl-Crypt-SSLeay is installed

next you need to set several environment variables and then forget
about hard setting the proxy URL in my code
look at the last post in this string
http://community.activestate.com/forum-topic/lwp-https-requests-proxy

finally simply you need to set the following environment variables
prior to executing the script
"
PERL_NET_HTTPS_SSL_SOCKET_CLASS = "Net::SSL"
# optional but often needed for self signed certs on the proxy
PERL_LWP_SSL_VERIFY_HOSTNAME = 0;
# this for SSL
HTTPS_PROXY = 'http-proxy.yourcompany.com:4430';
# this for non SSL
HTTP_PROXY = 'http-proxy.yourcompany.com:8080';
HTTPS_PROXY_USERNAME  = 'username';
HTTP_PROXY_USERNAME = $HTTPS_PROXY_USERNAME
HTTPS_PROXY_PASSWORD  = 'password';
HTTP_PROXY_PASSWORD  = $HTTPS_PROXY_PASSWORD
"



On Thu, Jan 3, 2013 at 7:31 AM, Pierre Casenove <pcasenove at gmail.com> wrote:
> Hello,
> So i've been doing some tests... and it doesn't work :(
> Frontier client in version 0.07b4 doesn't support authenticated proxy. The
> support is added in version 0.07b4p1
> So I can't use your script.
> i'll try to implement centos support on top of rhn-clone-errata.py...
>
> Pierre
>
>
> 2012/12/20 Pierre Casenove <pcasenove at gmail.com>
>>
>> That was exactly my plans!
>>
>> Le 19 déc. 2012 23:19, "Paul Robert Marino" <prmarino1 at gmail.com> a écrit
>> :
>>
>>> Actually quickly looking at it it should be fairly simple Im just
>>> working on an other project right now with a tight deadline so i cant
>>> get to it right now
>>>
>>> this is the module im using
>>>
>>> http://search.cpan.org/~kmacleod/Frontier-RPC-0.07b4/lib/Frontier/Client.pm
>>> The spacewalk_login subroutine would need to be altered along with the
>>> option parsing
>>> if I were to add it I would want to make it source and target specific
>>>  because I use the same subroutine to login to both spacewalk and RHN
>>> I actually have a fairly good idea how to do.
>>> in your case you can simply change
>>> "
>>> my $client = new Frontier::Client(url =>
>>> "https://$options->{$direction.'_host'}/rpc/api/", debug => 0);
>>> "
>>> to something like
>>> "
>>> my $client = new Frontier::Client(url =>
>>> "https://$options->{$direction.'_host'}/rpc/api/", debug =>
>>> 0,proxy=>'http://username:password@proxyhost:8080');
>>> "
>>> as a temporary workaround till I have the time to add the feature the
>>> down side is it will use the proxy when connecting to both the source
>>> and destination for the sync.
>>>
>>>
>>> On Wed, Dec 19, 2012 at 2:58 AM, Pierre Casenove <pcasenove at gmail.com>
>>> wrote:
>>> > Thanks a lot you the answers.
>>> > As the spacewalk server doesn't have access to the internet without the
>>> > authenticated proxy, it's kind of a no go.
>>> > If I have time, I'll try to work on your scruipt to get it proxy
>>> > compatible.
>>> >
>>> > Pierre
>>> >
>>> >
>>> > 2012/12/19 Paul Robert Marino <prmarino1 at gmail.com>
>>> >>
>>> >> On Tue, Dec 18, 2012 at 2:10 AM, Pierre Casenove <pcasenove at gmail.com>
>>> >> wrote:
>>> >> > Hello,
>>> >> > I'm currently using rhn-clone-errate to sync RHN errata.
>>> >> > But we've recently added centos distribution, so I need to create
>>> >> > errata
>>> >> > for
>>> >> > centos as well.
>>> >> > I've been looking at eva-direct-errata, which seems really
>>> >> > interesting
>>> >> > but I
>>> >> > don't understand how it works.
>>> >> > - How can I configure a proxy to connect to RHN?
>>> >> Unfortunately I never put that in because I wasn't sure how to do that
>>> >> with the RPC module I'm using but I may add it in the future
>>> >>
>>> >> > - I have the following channels configured:
>>> >> > 1 - CentOS 5 Base with Cent0S 5 Updates as child channel
>>> >> > 2 - rhel 5 Server
>>> >> > 3 - RHEL 5 Workstation
>>> >> > 4 - CentOS 6 Base with CentOS 6 Updates as child channel
>>> >> > 5 - RHEL 6 Server with RHEL 6 optionnal as child channel
>>> >> > As I understand the script, I need to launch it 5 times, changing
>>> >> > source
>>> >> > channels, dest channels and "rewirtepackagereleasefrom/to". Is it
>>> >> > correct?
>>> >>
>>> >> Yes this is due to a bug in the spacewalk API,s
>>> >> https://bugzilla.redhat.com/show_bug.cgi?id=834569
>>> >> If the bug ever gets fixed I will release a version that can do it in
>>> >> one round. I've already written a version in my non public git repo
>>> >> but due to the spacewalk bug im not releasing it to the public yet
>>> >>
>>> >> > - Is it possible to put some configuration directives (such as
>>> >> > user/password
>>> >> > information) in a config file?
>>> >> No not yet but you can use environment variables they are documented
>>> >> in the pod documentation
>>> >> use perldoc /path/to/script or pod2txt, pod2man. pod2... to read the
>>> >> documentation
>>> >> I highly suggest using the environment variables for now so your
>>> >> passwords don't show up in ps
>>> >>
>>> >> >
>>> >> > Thanks a lot for your help,
>>> >> >
>>> >> > Pierre
>>> >> >
>>> >> > _______________________________________________
>>> >> > Spacewalk-list mailing list
>>> >> > Spacewalk-list at redhat.com
>>> >> > https://www.redhat.com/mailman/listinfo/spacewalk-list
>>> >>
>>> >> _______________________________________________
>>> >> Spacewalk-list mailing list
>>> >> Spacewalk-list at redhat.com
>>> >> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > Spacewalk-list mailing list
>>> > Spacewalk-list at redhat.com
>>> > https://www.redhat.com/mailman/listinfo/spacewalk-list
>>>
>>> _______________________________________________
>>> Spacewalk-list mailing list
>>> Spacewalk-list at redhat.com
>>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>
>
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list




More information about the Spacewalk-list mailing list