Re: [Spacewalk-list] Scheduling Updates via API call

2012-10-12 Thread Peter Purvis
Thank you Franky, very useful. I'll give this a go as soon as I get a
chance.

P

On 11 October 2012 06:38, Franky Van Liedekerke liede...@telenet.be wrote:

 **

 Stupid webmail timeout ... see attachment

 Franky

 On 2012-10-11 13:36, Franky Van Liedekerke wrote:

 Ok, sorry I missed this mail.
 Is it possible to include files when sending to the list, or are
 attachments forbidden? We'll see ...

 See attach, just change these lines at the top to match your database
 setup:

 my $db_user = ;
 my $db_password = ;
 my $db_name = ;
 my $db_host = ;

 my $data_source = dbi:Oracle://$db_host:1531/$db_name;

 my $dbh = DBI-connect($data_source, $db_user, $db_password);

 Use the --help option for info.



 On 2012-10-10 17:42, Peter Purvis wrote:

  Would certainly be interesting to see that script, getting this working
 would be very useful.
 I would love to see the API call being fixed in the next version or even
 the inclusion of a scheduleInstallUpdates call.

 On 9 October 2012 10:34, Franky Van Liedekerke liede...@telenet.bewrote:

 Hi,

 I created a script (based on something I found on the net) just like this,
 but encountered issues since the API call
 system.listLatestUpgradeablePackages gives also older versions than the
 latest one (it gives all newer versions for every installed packet,
 instead
 of just the latest).
 In trunk, this is partially fixed but the fixed API call still gives back
 packages belonging to other channels ...

 So I created a perl script that uses the fixed SQL statement directly and
 made some checks so it's just the latest package that is really returned.
 the SQL statement should not be needed anymore after 1.8 is released
 If someone is interested, I can post it on a site (after a minor code
 cleanup) ... we use it to push updates via the API to multiple servers at
 once (easier than using the webitf, but a bit slower due to the extra
 checks needed)

 Franky








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

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

Re: [Spacewalk-list] Scheduling Updates via API call

2012-10-10 Thread Peter Purvis
Would certainly be interesting to see that script, getting this working
would be very useful.

I would love to see the API call being fixed in the next version or even
the inclusion of a scheduleInstallUpdates call.




On 9 October 2012 10:34, Franky Van Liedekerke liede...@telenet.be wrote:

 Hi,

 I created a script (based on something I found on the net) just like this,
 but encountered issues since the API call
 system.**listLatestUpgradeablePackages gives also older versions than the
 latest one (it gives all newer versions for every installed packet, instead
 of just the latest).
 In trunk, this is partially fixed but the fixed API call still gives back
 packages belonging to other channels ...

 So I created a perl script that uses the fixed SQL statement directly and
 made some checks so it's just the latest package that is really returned.
 the SQL statement should not be needed anymore after 1.8 is released
 If someone is interested, I can post it on a site (after a minor code
 cleanup) ... we use it to push updates via the API to multiple servers at
 once (easier than using the webitf, but a bit slower due to the extra
 checks needed)

 Franky



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

Re: [Spacewalk-list] centos-errata.py package_dir value

2012-02-08 Thread Peter Purvis
Thanks Ege,

I've just tried against our updates repo, which it turns out is really out
of date which in turn causes the script to fail as it can't find the
packages.

Will grab a more recent sync now and see if that works.

Seems a bit counter intuitive that the packages are needed for the errata
script to work? Perhaps someone can explain the process.

On 8 February 2012 11:59, Ege Turgay ege.tur...@maglabs.net wrote:

 **
 Hi,

 I use a local repo by setting up a cronjob as

 rsync -avrt --progress rsync://
 rsync.mirrorservice.org/mirror.centos.org/5/os/x86_64//var/www/html/repos/centos/5/os/x86_64/

 and setting that package_dir to /var/www/html/repos/centos/5/os/x86_64/

 Hope it helps,

 Ege


 On Wed, 2012-02-08 at 10:58 +, Peter Purvis wrote:

 If I'm reposyncing from a separate host, so the only place on the
 spacewalk server I actually have any packages is in /var/satellite what
 should I be setting the package_dir value to?



  If I use /var/satellite the script complains it can't find
 /var/satellite/package-ver.s.i.on.rpm but I don't really have any
 alternatives.



  I suppose my way around this would be to mount the remote repo store,
 but I'd rather avoid if possible.



  Thanks

  ___
 Spacewalk-list mailing 
 listSpacewalk-list@redhat.comhttps://www.redhat.com/mailman/listinfo/spacewalk-list



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

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

Re: [Spacewalk-list] API Call system.provisionVirtualGuest - Spacewalk 1.6

2012-01-27 Thread Peter Purvis
Thanks for the response Tomas.

Realised it was talking about the virtual host rather than the guest, added
the spacewalk-koan and koan packages to the appropriate repository and it
works.

My next issue is the command is working, a package installation is
completed but for the installation itself rhn_check shows the following and
my mailbox is getting spammed heavily!

Could not retrieve action item from server RetryServer for
{spacewalk.fqdn}/XMLRPC
Error code: 1While running 'queue.get': caught
exceptions.TypeError : cannot marshal None unless allow_none is enabled

Any ideas? Can provide the full dump if necessary.





 If I remember well, this message is displayed, when spacewalk-koan isn't
 found. It needs to be in one of the channels the system is currently
 subscribed to or in any child channel (of the current base ch.) the server
 can
 be subscribed to - in that case the server would be subscribed to such a
 child
 channel automatically.

 Last time I just created a child channel with spacewalk-koan packages and
 it
 worked for me.


 No, the API creates cobbler system record for you.

 The other option would be to try it over WebUI.

 Regards,
 Tomas



On 27 January 2012 10:18, Tomas Lestach tlest...@redhat.com wrote:

 On Thursday 26 of January 2012 23:21:43 Peter Purvis wrote:
  I'm attempting to create a new virtual system using the following xmlrpc
  command in ruby:
 
  spacewalk.call(system.provisionVirtualGuest,token, {kvm-host-id}, 
  test.example.com ,CentOS-5-5-x86_64-kvm)
 
  I get the following error:
 
   Could not find the needed Spacewalk provisioning packages given this
  system's current base channel and desired target channel: {0}


 If I remember well, this message is displayed, when spacewalk-koan isn't
 found. It needs to be in one of the channels the system is currently
 subscribed to or in any child channel (of the current base ch.) the server
 can
 be subscribed to - in that case the server would be subscribed to such a
 child
 channel automatically.

 Last time I just created a child channel with spacewalk-koan packages and
 it
 worked for me.

 
  The base channel and the target channel have both koan and spacewalk-koan
  in the repo now that I have rhnpush'ed them in.
 
  a. Do I need this system to be in the cobbler database or in spacewalk
  before it can be provisioned?

 No, the API creates cobbler system record for you.

 The other option would be to try it over WebUI.

 Regards,
 Tomas
 --
 Tomas Lestach
 RHN Satellite Engineering, Red Hat

  If so, how can I do that for a brand new
  system, all I can find is system.createSystemRecord which requires the
  systemID of an existing spacewalk system, not something I have in this
  instance.
  b. Is there something I'm missing here? Can I not just throw a new system
  at spacewalk with a guestname only? If so, what is the process to add a
  system to spacewalk and have it provisioned on a virtual host.
 
  Thanks for any help!


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