Hello, I either did not properly apply the fix, or the issue is still present when scheduling scripts from the SSM. On individual system, it works, through SSM, it fails.
Pierre 2014-04-09 7:33 GMT+02:00 Pierre Casenove <[email protected]>: > Hello, > Fixed it too. Thanks a lot > > Piere > Le 9 avr. 2014 01:09, "BERGMAN Andrew" <[email protected]> a > écrit : > > Fixed thank you :) >> >> -----Original Message----- >> From: [email protected] [mailto: >> [email protected]] On Behalf Of Milan Zázrivec >> Sent: Tuesday, 8 April 2014 11:02 PM >> To: [email protected] >> Subject: Re: [Spacewalk-list] Spacewalk 2.1 - characters in remote >> commands >> >> On Monday 07 April 2014 08:54:46 Milan Zázrivec wrote: >> > On Friday 04 April 2014 18:27:02 Pierre Casenove wrote: >> > > Hello, >> > > Should we understand that this regression won't be fixed until v2.2? >> > > I think that many people execute scripts with redirections... and >> > > still wants to use the UI. At least I do. >> > >> > In truth, at the moment, this bug is not fixed, not even in current >> > Spacewalk nightly. >> >> Actually, today I fixed the problem in Spacewalk nightly in the following >> commit: >> >> >> https://github.com/spacewalkproject/spacewalk/commit/22904881c43599d73fb4181a0885000cb49f50bc >> >> To fix this issue on an installed Spacewalk 2.1, please apply the same >> change to the following file on your Spacewalk: >> >> /var/lib/tomcat[56]/webapps/rhn/WEB-INF/struts-config.xml >> >> and restart tomcat. >> >> Thank you for the report & sorry for the trouble. >> -Milan Zázrivec >> >> > > 2014-04-02 10:16 GMT+02:00 Milan Zázrivec <[email protected]>: >> > > > On Tuesday 01 April 2014 21:09:31 BERGMAN Andrew wrote: >> > > > > Milan, >> > > > > >> > > > > Thanks for confirming this is a bug not a lack of functionality. >> > > > > >> > > > > I am not sure what I am supposed to do with that link to be >> > > > > honest >> > > > > >> > > > > I am gathering that somewhere there is a call made when it >> > > > > schedules a command and I need to change that call to be another >> > > > > kind of call that works in 2.1? >> > > > >> > > > Most of the stuff you can do in Spacewalk webui you are also able >> > > > to achieve with Spacewalk's XML-RPC API (i.e. you don't need your >> > > > browser, but you're able to write set of scripts which will >> > > > automate whatever you'd otherwise be doing manually clicking in >> > > > webui). >> > > > >> > > > So just as you're able to schedule a remote command in the webui, >> > > > you're able to do it with a xml-rpc script. Webui in Spacewalk 2.1 >> > > > won't accept >< signs, but xml-rpc api does (tested). >> > > > >> > > > Some example scripts: >> > > > >> > > > http://www.spacewalkproject.org/documentation/api/2.1/scripts.html >> > > > >> > > > And in your particular case, the script you'd want (in python): >> > > > >> > > > ... >> > > > #!/usr/bin/python >> > > > import xmlrpclib >> > > > >> > > > SATELLITE_URL = "http://your.spacewalk.url.com/rpc/api" >> > > > SATELLITE_LOGIN = "youruser" >> > > > SATELLITE_PASSWORD = "yourpassword" >> > > > >> > > > system_id = 0 # change this to the system id you want to schedule >> > > > the run for >> > > > user = "root" # change this to the user to run the remote >> command as >> > > > groupt = "root" # change this to the group to run the remote >> > > > command as timeout = 60 # in seconds script = """ >> > > > #!/bin/bash >> > > > >> > > > echo "whatever" > /tmp/wherever >> > > > """ >> > > > >> > > > client = xmlrpclib.Server(SATELLITE_URL, verbose=0) >> > > > >> > > > key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD) >> > > > client.system.schedule_script_run(key, >> > > > >> > > > system_id, \ >> > > > user, \ >> > > > group, \ >> > > > timeout, \ >> > > > script, \ >> > > > xmlrpclib.DateTime()) >> > > > >> > > > client.auth.logout(key) >> > > > ... >> > > > >> > > > Regards >> > > > -MZ >> > > > >> > > > > -----Original Message----- >> > > > > From: [email protected] >> > > > > [mailto:[email protected]] On Behalf Of Milan >> > > > > Zázrivec >> > > > > Sent: Tuesday, 1 April 2014 7:02 PM >> > > > > To: [email protected] >> > > > > Subject: Re: [Spacewalk-list] Spacewalk 2.1 - characters in >> > > > > remote >> > > > >> > > > commands >> > > > >> > > > > On Monday 31 March 2014 21:36:10 BERGMAN Andrew wrote: >> > > > > > Hi , >> > > > > > >> > > > > > I have done a bit of google searching but not had much luck >> > > > > > finding an answer so I am posting on here. >> > > > > > >> > > > > > When sending a remote commands I am finding > characters >> > > > > > getting stripped out and making the command fail. I haven't >> > > > > > noticed any others yet but I get the feeling that the > >> > > > > > character will not be the >> > > > >> > > > only >> > > > >> > > > > > one. >> > > > > >> > > > > You have just discovered a bug in Spacewalk 2.1 webui. This used >> > > > > to work just fine in Spacewalk 2.0. >> > > > > >> > > > > > Does anyone know a way of sending such characters using remote >> > > > > > commands or are we limited to very basic forms of commands? >> > > > > >> > > > > Using > or < in the remote commands is all right. Right now >> > > > > though your >> > > > >> > > > only >> > > > >> > > > > option is to use XML-RPC API and system.scheduleScriptRun() call: >> > > > http://www.spacewalkproject.org/documentation/api/2.1/handlers/Sys >> > > > temHan >> > > > dl >> > > > er> >> > > > >> > > > > .html#scheduleScriptRun >> > > > > >> > > > > Regards >> > > > > -Milan Zázrivec >> > > > > >> > > > > _______________________________________________ >> > > > > Spacewalk-list mailing list >> > > > > [email protected] >> > > > > https://www.redhat.com/mailman/listinfo/spacewalk-list >> > > > > >> > > > > ________________________________________________________________ >> > > > > ______ This email has been scanned by the Symantec Email >> > > > > Security.cloud service. >> > > > > For more information please visit http://www.symanteccloud.com >> > > > > ________________________________________________________________ >> > > > > ______ >> > > > > >> > > > > 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. >> > > > > ________________________________________________________________ >> > > > > ______ >> > > > >> > > > This >> > > > >> > > > > email has been scanned by the Symantec Email Security.cloud >> service. >> > > > > For >> > > > > more information please visit http://www.symanteccloud.com >> > > > > ________________________________________________________________ >> > > > > ______ >> > > > > >> > > > > _______________________________________________ >> > > > > Spacewalk-list mailing list >> > > > > [email protected] >> > > > > https://www.redhat.com/mailman/listinfo/spacewalk-list >> > > > >> > > > _______________________________________________ >> > > > Spacewalk-list mailing list >> > > > [email protected] >> > > > https://www.redhat.com/mailman/listinfo/spacewalk-list >> > >> > _______________________________________________ >> > Spacewalk-list mailing list >> > [email protected] >> > https://www.redhat.com/mailman/listinfo/spacewalk-list >> >> >> _______________________________________________ >> Spacewalk-list mailing list >> [email protected] >> https://www.redhat.com/mailman/listinfo/spacewalk-list >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit >> http://www.symanteccloud.com______________________________________________________________________ >> >> 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. >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> >> _______________________________________________ >> Spacewalk-list mailing list >> [email protected] >> https://www.redhat.com/mailman/listinfo/spacewalk-list >> >
_______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
