Merge ~lgp171188/launchpad:set-up-ppa-update-keys-cronscript into launchpad:master

Proposed by Guruprasad
Status: Merged
Approved by: Guruprasad
Approved revision: 7fd9d7ef3d8262d337f15413c54fd6a867391457
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~lgp171188/launchpad:set-up-ppa-update-keys-cronscript
Merge into: launchpad:master
Diff against target: 42 lines (+10/-1)
3 files modified
charm/launchpad-ppa-publisher/config.yaml (+6/-0)
charm/launchpad-ppa-publisher/templates/crontab.j2 (+3/-0)
cronscripts/ppa-update-keys.py (+1/-1)
Reviewer Review Type Date Requested Status
Simone Pelosi Approve
Review via email: mp+464690@code.launchpad.net

Commit message

charm/launchpad-ppa-publisher: Add the PPA key updater cron job

Also use a unique name for the ppa-update-keys cron script,

To post a comment you must log in.
Revision history for this message
Simone Pelosi (pelpsi) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charm/launchpad-ppa-publisher/config.yaml b/charm/launchpad-ppa-publisher/config.yaml
2index 84483d6..1c1940b 100644
3--- a/charm/launchpad-ppa-publisher/config.yaml
4+++ b/charm/launchpad-ppa-publisher/config.yaml
5@@ -50,6 +50,12 @@ options:
6 type: string
7 default:
8 description: If set, use as rsync endpoint for synchronizing the OVAL data.
9+ ppa_update_keys_script_archives_limit:
10+ type: int
11+ default: 1000
12+ description: |
13+ The number of affected PPAs that the ppa-update-keys.py cron script should
14+ process in a single run.
15 require_signing_keys:
16 type: boolean
17 description: >
18diff --git a/charm/launchpad-ppa-publisher/templates/crontab.j2 b/charm/launchpad-ppa-publisher/templates/crontab.j2
19index 7096ac0..dbe2998 100644
20--- a/charm/launchpad-ppa-publisher/templates/crontab.j2
21+++ b/charm/launchpad-ppa-publisher/templates/crontab.j2
22@@ -19,6 +19,9 @@ P3AROOT={{ ppa_archive_private_root }}
23 */20 * * * * nice -n 12 ionice -c 2 -n 7 {{ code_dir }}/cronscripts/ppa-generate-keys.py -q --log-file=INFO:{{ logs_dir }}/ppa-generate-keys.log
24 {% endif %}
25
26+# This cron job will generate new 4096-bit RSA signing keys for PPAs that only have a 1024-bit RSA signing key
27+*/15 * * * * nice -n 12 ionice -c 2 -n 7 {{ code_dir }}/cronscripts/ppa-update-keys.py -L {{ ppa_update_keys_script_archives_limit }} -q --log-file=INFO:{{ logs_dir }}/ppa-update-keys.log
28+
29 # OOPS amqp
30 */15 * * * * {{ code_dir }}/bin/datedir2amqp --exchange oopses --host {{ rabbitmq_host }} --username {{ rabbitmq_username }} --password {{ rabbitmq_password }} --vhost {{ rabbitmq_vhost }} --repo {{ oopses_dir }} --key ""
31
32diff --git a/cronscripts/ppa-update-keys.py b/cronscripts/ppa-update-keys.py
33index 50ebef9..94dda2b 100755
34--- a/cronscripts/ppa-update-keys.py
35+++ b/cronscripts/ppa-update-keys.py
36@@ -14,5 +14,5 @@ from lp.services.config import config
37 from lp.soyuz.scripts.ppakeyupdater import PPAKeyUpdater
38
39 if __name__ == "__main__":
40- script = PPAKeyUpdater("ppa-generate-keys", config.archivepublisher.dbuser)
41+ script = PPAKeyUpdater("ppa-update-keys", config.archivepublisher.dbuser)
42 script.lock_and_run()

Subscribers

People subscribed via source and target branches

to status/vote changes: