<div dir="ltr">Hello,<div>I either did not properly apply the fix, or the issue is still present when scheduling scripts from the SSM.</div><div>On individual system, it works, through SSM, it fails.</div><div><br></div><div>
Pierre</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-09 7:33 GMT+02:00 Pierre Casenove <span dir="ltr"><<a href="mailto:pcasenove@gmail.com" target="_blank">pcasenove@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hello,<br>
Fixed it too. Thanks a lot</p>
<p dir="ltr">Piere</p>
<div class="gmail_quote">Le 9 avr. 2014 01:09, "BERGMAN Andrew" <<a href="mailto:Andrew.BERGMAN@svhm.org.au" target="_blank">Andrew.BERGMAN@svhm.org.au</a>> a écrit :<div><div class="h5"><br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Fixed thank you :)<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a> [mailto:<a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a>] On Behalf Of Milan Zázrivec<br>


Sent: Tuesday, 8 April 2014 11:02 PM<br>
To: <a href="mailto:spacewalk-list@redhat.com" target="_blank">spacewalk-list@redhat.com</a><br>
Subject: Re: [Spacewalk-list] Spacewalk 2.1 - characters in remote commands<br>
<br>
On Monday 07 April 2014 08:54:46 Milan Zázrivec wrote:<br>
> On Friday 04 April 2014 18:27:02 Pierre Casenove wrote:<br>
> > Hello,<br>
> > Should we understand that this regression won't be fixed until v2.2?<br>
> > I think that many people execute scripts with redirections... and<br>
> > still wants to use the UI. At least I do.<br>
><br>
> In truth, at the moment, this bug is not fixed, not even in current<br>
> Spacewalk nightly.<br>
<br>
Actually, today I fixed the problem in Spacewalk nightly in the following<br>
commit:<br>
<br>
<a href="https://github.com/spacewalkproject/spacewalk/commit/22904881c43599d73fb4181a0885000cb49f50bc" target="_blank">https://github.com/spacewalkproject/spacewalk/commit/22904881c43599d73fb4181a0885000cb49f50bc</a><br>


<br>
To fix this issue on an installed Spacewalk 2.1, please apply the same change to the following file on your Spacewalk:<br>
<br>
/var/lib/tomcat[56]/webapps/rhn/WEB-INF/struts-config.xml<br>
<br>
and restart tomcat.<br>
<br>
Thank you for the report & sorry for the trouble.<br>
-Milan Zázrivec<br>
<br>
> > 2014-04-02 10:16 GMT+02:00 Milan Zázrivec <<a href="mailto:mzazrivec@redhat.com" target="_blank">mzazrivec@redhat.com</a>>:<br>
> > > On Tuesday 01 April 2014 21:09:31 BERGMAN Andrew wrote:<br>
> > > > Milan,<br>
> > > ><br>
> > > > Thanks for confirming this is a bug not a lack of functionality.<br>
> > > ><br>
> > > > I am not sure what I am supposed to do with that link to be<br>
> > > > honest<br>
> > > ><br>
> > > > I am gathering that somewhere there is a call made when it<br>
> > > > schedules a command and I need to change that call to be another<br>
> > > > kind of call that works in 2.1?<br>
> > ><br>
> > > Most of the stuff you can do in Spacewalk webui you are also able<br>
> > > to achieve with Spacewalk's XML-RPC API (i.e. you don't need your<br>
> > > browser, but you're able to write set of scripts which will<br>
> > > automate whatever you'd otherwise be doing manually clicking in<br>
> > > webui).<br>
> > ><br>
> > > So just as you're able to schedule a remote command in the webui,<br>
> > > you're able to do it with a xml-rpc script. Webui in Spacewalk 2.1<br>
> > > won't accept >< signs, but xml-rpc api does (tested).<br>
> > ><br>
> > > Some example scripts:<br>
> > ><br>
> > > <a href="http://www.spacewalkproject.org/documentation/api/2.1/scripts.html" target="_blank">http://www.spacewalkproject.org/documentation/api/2.1/scripts.html</a><br>
> > ><br>
> > > And in your particular case, the script you'd want (in python):<br>
> > ><br>
> > > ...<br>
> > > #!/usr/bin/python<br>
> > > import xmlrpclib<br>
> > ><br>
> > > SATELLITE_URL = "<a href="http://your.spacewalk.url.com/rpc/api" target="_blank">http://your.spacewalk.url.com/rpc/api</a>"<br>
> > > SATELLITE_LOGIN = "youruser"<br>
> > > SATELLITE_PASSWORD = "yourpassword"<br>
> > ><br>
> > > system_id = 0 # change this to the system id you want to schedule<br>
> > > the run for<br>
> > > user = "root"     # change this to the user to run the remote command as<br>
> > > groupt = "root"  # change this to the group to run the remote<br>
> > > command as timeout = 60 # in seconds script = """<br>
> > > #!/bin/bash<br>
> > ><br>
> > > echo "whatever" > /tmp/wherever<br>
> > > """<br>
> > ><br>
> > > client = xmlrpclib.Server(SATELLITE_URL, verbose=0)<br>
> > ><br>
> > > key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)<br>
> > > client.system.schedule_script_run(key,<br>
> > ><br>
> > >     system_id, \<br>
> > >     user, \<br>
> > >     group, \<br>
> > >     timeout, \<br>
> > >     script, \<br>
> > >     xmlrpclib.DateTime())<br>
> > ><br>
> > > client.auth.logout(key)<br>
> > > ...<br>
> > ><br>
> > > Regards<br>
> > > -MZ<br>
> > ><br>
> > > > -----Original Message-----<br>
> > > > From: <a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a><br>
> > > > [mailto:<a href="mailto:spacewalk-list-bounces@redhat.com" target="_blank">spacewalk-list-bounces@redhat.com</a>] On Behalf Of Milan<br>
> > > > Zázrivec<br>
> > > > Sent: Tuesday, 1 April 2014 7:02 PM<br>
> > > > To: <a href="mailto:spacewalk-list@redhat.com" target="_blank">spacewalk-list@redhat.com</a><br>
> > > > Subject: Re: [Spacewalk-list] Spacewalk 2.1 - characters in<br>
> > > > remote<br>
> > ><br>
> > > commands<br>
> > ><br>
> > > > On Monday 31 March 2014 21:36:10 BERGMAN Andrew wrote:<br>
> > > > > Hi ,<br>
> > > > ><br>
> > > > > I have done a bit of google searching but not had much luck<br>
> > > > > finding an answer so I am posting on here.<br>
> > > > ><br>
> > > > > When sending a remote commands I am finding > characters<br>
> > > > > getting stripped out and making the command fail.  I haven't<br>
> > > > > noticed any others yet but I get the feeling that the ><br>
> > > > > character will not be the<br>
> > ><br>
> > > only<br>
> > ><br>
> > > > > one.<br>
> > > ><br>
> > > > You have just discovered a bug in Spacewalk 2.1 webui. This used<br>
> > > > to work just fine in Spacewalk 2.0.<br>
> > > ><br>
> > > > > Does anyone know a way of sending such characters using remote<br>
> > > > > commands or are we limited to very basic forms of commands?<br>
> > > ><br>
> > > > Using > or < in the remote commands is all right. Right now<br>
> > > > though your<br>
> > ><br>
> > > only<br>
> > ><br>
> > > > option is to use XML-RPC API and system.scheduleScriptRun() call:<br>
> > > <a href="http://www.spacewalkproject.org/documentation/api/2.1/handlers/Sys" target="_blank">http://www.spacewalkproject.org/documentation/api/2.1/handlers/Sys</a><br>
> > > temHan<br>
> > > dl<br>
> > > er><br>
> > ><br>
> > > > .html#scheduleScriptRun<br>
> > > ><br>
> > > > Regards<br>
> > > > -Milan Zázrivec<br>
> > > ><br>
> > > > _______________________________________________<br>
> > > > Spacewalk-list mailing list<br>
> > > > <a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
> > > > <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
> > > ><br>
> > > > ________________________________________________________________<br>
> > > > ______ This email has been scanned by the Symantec Email<br>
> > > > Security.cloud service.<br>
> > > > For more information please visit <a href="http://www.symanteccloud.com" target="_blank">http://www.symanteccloud.com</a><br>
> > > > ________________________________________________________________<br>
> > > > ______<br>
> > > ><br>
> > > > Disclaimer : The contents of this e-mail including any<br>
> > > > attachments are intended only for the person or entity to which<br>
> > > > this e-mail is addressed and may contain confidential,<br>
> > > > privileged and/or commercially sensitive material. If you are<br>
> > > > not, or believe you may not be, the intended recipient, please<br>
> > > > advise the sender immediately by return e-mail, delete this<br>
> > > > e-mail and destroy any copies.<br>
> > > > ________________________________________________________________<br>
> > > > ______<br>
> > ><br>
> > > This<br>
> > ><br>
> > > > email has been scanned by the Symantec Email Security.cloud service.<br>
> > > > For<br>
> > > > more information please visit <a href="http://www.symanteccloud.com" target="_blank">http://www.symanteccloud.com</a><br>
> > > > ________________________________________________________________<br>
> > > > ______<br>
> > > ><br>
> > > > _______________________________________________<br>
> > > > Spacewalk-list mailing list<br>
> > > > <a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
> > > > <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
> > ><br>
> > > _______________________________________________<br>
> > > Spacewalk-list mailing list<br>
> > > <a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
> > > <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
><br>
> _______________________________________________<br>
> Spacewalk-list mailing list<br>
> <a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
<br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
<br>
______________________________________________________________________<br>
This email has been scanned by the Symantec Email Security.cloud service.<br>
For more information please visit <a href="http://www.symanteccloud.com" target="_blank">http://www.symanteccloud.com</a> ______________________________________________________________________<br>
<br>
Disclaimer : The contents of this e-mail including any attachments are intended only for the person or entity to which this e-mail is addressed and may contain confidential, privileged and/or commercially sensitive material. If you are not, or believe you may not be, the intended recipient, please advise the sender immediately by return e-mail, delete this e-mail and destroy any copies.<br>


______________________________________________________________________<br>
This email has been scanned by the Symantec Email Security.cloud service.<br>
For more information please visit <a href="http://www.symanteccloud.com" target="_blank">http://www.symanteccloud.com</a><br>
______________________________________________________________________<br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
</blockquote></div></div></div>
</blockquote></div><br></div>