Skip to content

stdevel/arsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 

Repository files navigation

arsa

arsa.py is a script for archiving and removing old Uyuni or SUSE Multi-Linux Manager actions.

The login credentials are prompted when running the script. If you need to automate this (e.g. cronjobs) you have two options:

Setting two shell variables

The following shell variables are used:

  • UYUNI_LOGIN - a username
  • UYUNI_PASSWORD - the appropriate password

You might also want to set the HISTFILE variable (depending on your shell) to hide the command including the password in the history:

$ HISTFILE="" UYUNI_LOGIN=mylogin UYUNI_PASSWORD=mypass ./arsa.py -n

Using an authfile

A better possibility is to create a authfile with permisions 0600. Just enter the username in the first line and the password in the second line and hand the path to the script:

$ ./arsa.py -n -a myauthfile

By default the script archives completed actions but you can also remove archived actions.

Parameters

The following parameters can be specified:

Parameter Description
-d / --debug enable debugging outputs (default: no)
-h / --help shows help and quits
-a / --authfile defines an authfile to instead of shell variables
-s / --server defines the server to use (default: localhost)
-r / --remove archives completed actions and removes all archvied actions (default: no)
-n / --dry-run only lists actions that would be archived (default: no)
-f / --include-failed also include failed actions (default: no)
-t / --only-system-tasks only consider automated system tasks such as package list refresh (default: no)
--timeout API timeout in seconds (default: 120)
-b / --bunch-size Bunch size of actions to be deleted at once (default: 100)
-w / --bunch-wait Seconds to wait before deleting the next action bunch (default: 30)
--version prints programm version and quits

Examples

Listing all completed actions (login information are passed using shell variables):

$ UYUNI_LOGIN=mylogin UYUNI_PASSWORD=mypass ./arsa.py -n
INFO:arsa.py:Found 465 completed, 35 failed and 6 archived actions
INFO:arsa.py:Handling bunch #1 of 5
INFO:arsa.py:I'd live to archive task #636: Hardware List Refresh scheduled by (unknown)
INFO:arsa.py:I'd live to archive task #635: Apply highstate scheduled by admin
...

Removing all completed actions (login information are provided by the authfile):

$ ./arsa.py -a myauthfile

Removing all completed and archived actions (login information are prompted):

$ ./arsa.py -r
Username: mylogin
Password: 
INFO:arsa.py:Found 465 completed, 35 failed and 6 archived actions
INFO:arsa.py:Handling bunch #1 of 5
...

Using customized API bunch sizes and timeouts:

$ ./arsa.py -b 50 -w 20
Username: mylogin
Password: 
INFO:arsa.py:Found 465 completed, 35 failed and 6 archived actions
INFO:arsa.py:Handling bunch #1 of 10
...

About

a script for archiving and removing old Spacewalk, Red Hat Satellite 5.x or SUSE Manager actions

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages