An agent will need to run on the toolforge cron submission host. It will check ldap for disabled tools and ensure that the crontab for that tool is archived to the tool's local directory. It will also have to search for all archived crontabs and re-enable them for any active tool.
Description
Description
Details
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | bd808 | T133777 Tools that should get archived/deleted (tracking) | |||
Resolved | Andrew | T170355 Figure out process for deleting an unused tool | |||
Resolved | Andrew | T284946 agent to archive (or de-archive) crontabs for disabled or re-enabled tools |
Event Timeline
Comment Actions
Change 699927 had a related patch set uploaded (by Andrew Bogott; author: Andrew Bogott):
[cloud/toolforge@main] Add 'disable_tools.py', a catch-all project for disabling tools
Comment Actions
Change 699927 abandoned by Andrew Bogott:
[cloud/toolforge@main] Add 'disable_tools.py', a catch-all project for disabling tools
Reason:
This is in a different repo
Comment Actions
Change 706034 had a related patch set uploaded (by Andrew Bogott; author: Andrew Bogott):
[operations/puppet@production] toolforge grid-engine cron: use disable_tool.py to archive crontab for disabled tools
Comment Actions
Change 706034 merged by Andrew Bogott:
[operations/puppet@production] toolforge cron: use disable_tool.py to archive crontab for disabled tools
Comment Actions
This agent is failing just now, like this:
Aug 5 21:55:02 labstore1004 disable_tool.py[38376]: Traceback (most recent call last): Aug 5 21:55:02 labstore1004 disable_tool.py[38376]: File "/srv/disable-tool/disable_tool.py", line 539, in <module> Aug 5 21:55:02 labstore1004 disable_tool.py[38376]: args.func(config) Aug 5 21:55:02 labstore1004 disable_tool.py[38376]: File "/srv/disable-tool/disable_tool.py", line 409, in archive Aug 5 21:55:02 labstore1004 disable_tool.py[38376]: if _is_expired(datestamp, int(conf["default"]["archive_after_days"])): Aug 5 21:55:02 labstore1004 disable_tool.py[38376]: File "/srv/disable-tool/disable_tool.py", line 128, in _is_expired Aug 5 21:55:02 labstore1004 disable_tool.py[38376]: LOG.info("Elapsed days is %s" % (datetime.datetime.now() - datestamp).days) Aug 5 21:55:02 labstore1004 disable_tool.py[38376]: TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'datetime.date' Aug 5 21:55:02 labstore1004 systemd[1]: disable-tool.service: Main process exited, code=exited, status=1/FAILURE Aug 5 21:55:02 labstore1004 systemd[1]: disable-tool.service: Unit entered failed state. Aug 5 21:55:02 labstore1004 systemd[1]: disable-tool.service: Failed with result 'exit-code'.