```
$SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff --octocI, [2022-01-06T14:57:13.783163 #204691] INFO -- : Catalog-diff-args --no-truncate-details --to staging worker01s compiled for worker01.softwareheritage.org
...
*** Running octocatalog-diff on host worker01.softwareheritage.org
I, [2022-01-06T11:45:24.080937 #185845] INFO -- : Catalogs compiled for worker01.softwareheritage.org
I, [2022-01-06T11:45:24.446708 #1858454:57:14.153481 #204691] INFO -- : Diffs computed for worker01.softwareheritage.org
diff origin/production/worker01.softwareheritage.org current/worker01.softwareheritage.org
*******************************************
- File[/etc/systemd/system/opam-manage-shared-state-coq.inria.fr.service]
*******************************************
File[/etc/systemd/system/opam-manage-shared-state-coq.inria.fr.timer] =>
parameters =>
ensure =>
- file
+ absent
*******************************************
- File[/etc/systemd/system/opam-manage-shared-state-ocamlbench-repo.service]
*******************************************
File[/etc/systemd/system/opam-manage-shared-state-ocamlbench-repo.timer] =>
parameters =>
ensure =>
- file
+ absent
*******************************************
- File[/etc/systemd/system/opam-manage-shared-state-opam.ocaml.org.service]
*******************************************
File[/etc/systemd/system/opam-manage-shared-state-opam.ocaml.org.timer] =>
parameters =>
ensure =>
- file
+ absent
*******************************************
+ File[/etc/systemd/system/opam-manage-shared-state.service] =>
parameters =>
"ensure": "file"
"group": "root"
"mode": "0444"
"notify": "Class[Systemd::Systemctl::Daemon_reload]"
"owner": "root"
"show_diff": true
"content": >>>
# Opam manage shared state unit file
# Managed by puppet class profile::swh::deploy::worker::loader_opam
# Changes will be overwritten
[Unit]
Description=Software Heritage Manage OPAM shared state
Requires=network.target
After=network.target
[Service]
User=swhworker
Group=swhworker
Type=simple
ExecStart=/usr/bin/run-parts /run/systemd/system/opam/local/bin/opam-manage-shared-state.sh
[Install]
WantedBy=multi-user.target
<<<
*******************************************
+ File[/etc/systemd/system/opam-manage-shared-state.timer] =>
parameters =>
"ensure": "file"
"group": "root"
"mode": "0444"
"notify": ["Class[Systemd::Systemctl::Daemon_reload]", "Service[opam-manage-shared-state.timer]"]
"owner": "root"
"show_diff": true
"content": >>>
[Install]
WantedBy=timers.target
[Timer]
OnCalendar=daily
Persistent=true
# every ~4h
AccuracySec=4h
PersistentRandomizedDelaySec=1200
FixedRandomDelay=true
Unit=.service
[Unit]
Description=Software Heritage Manage OPAM shared state timer
<<<
*******************************************
+ File[/run/systemd/system/opam//0-usr/local/bin/opam-manage-shared-state-coq.inria.fr.sh.sh] =>
parameters =>
content =>
"ensure": "file"@@ -4,19 +4,50 @@
# Changes will be overwritten
"group": "swhworker"_
"mode": "0755"-CMD=/usr/bin/opam
"owner": "swhworker"+# This script is in charge of bootstraping the opam root folder with the default opam
"content": >>>+# repository.
#!/usr/bin/env bash
# Managed by puppet class profile::swh::deploy::worker::loader_opam +
# Changes will be overwritten
# This script is in charge of adding (or updating) secondary opam repositories. +set -e
# It's expected to be called after the script which bootstrap the opam root folder.
set -e
CMD=/usr/bin/opam +
ROOT_DIR=/tmp/opam/
-DEFAULT_INSTANCE=coq.inria.fr"opam.ocaml.org"
INSTANCE_URL=https://coq.inria.fr/opam/released
# Other instances, if present should be updated. If not present, they should be added -INSTANCE=$1
# to the main root_dir as extra instances -INSTANCE_URL=$2
( $CMD repo --all --root $ROOT_DIR | grep $INSTANCE_URL && $CMD update --root $ROOT_DIR ) \ -
|| $CMD repository add --root $ROOT_DIR $ -if [ $INSTANCE = $DEFAULT_INSTANCE $INSTANCE_URL]; then
<<< - # Opam instance is considered the main instance so we must initialize the repository
******************************************* - # if not present, otherwise we update it
+ File[/run/systemd/system/opam//0-opam-manage-shared-state-ocamlbench-repo.sh.sh] => - ( $CMD repo --all --root $ROOT_DIR | grep $INSTANCE_URL && $CMD update --root $ROOT_DIR ) \
parameters => - || $CMD init --reinit --bare --no-setup --root $ROOT_DIR $INSTANCE $INSTANCE_URL
"ensure": "file"-else
"group": "swhworker"- # Other instances, if present should be updated. If not present, they should be added
"mode": "0755"- # to the main root_dir as extra instances
"owner": "swhworker"- ( $CMD repo --all --root $ROOT_DIR | grep $INSTANCE_URL && $CMD update --root $ROOT_DIR ) \
"content": >>>- || $CMD repository add --root $ROOT_DIR $INSTANCE $INSTANCE_URL
#!/usr/bin/env bash
# Managed by puppet class profile::swh::deploy::worker::loader_opam -fi
# Changes will be overwritten
# This script is in charge of adding (or updating) secondary +CMD=/usr/bin/opam repositories.
# It's expected to be called after the script which bootstrap the opam root folder.
set -e
CMD=/usr/bin/opam +
ROOT_DIR=/tmp/ +function init_or_update_opam/_root () {
INSTANCE=ocamlbench-repo + "Ensure opam root directory exists and references the main opam repository as default
INSTANCE_URL=https://github.com/OCamlPro/ocamlbench-repo.git
# Other instances + instance. If not, if present should be updatedcreate it from scratch. If not presentIf properly configured, they should be addedupdate the opam
# to the main root_dir as extra instances + repository."
( $CMD repo --all --root $ROOT_DIR | grep $INSTANCE_URL && $CMD update --root $ROOT_DIR ) \ +
|| $CMD repository add --root $ROOT_DIR $INSTANCE $INSTANCE_URL + instance_name=$1
<<< + instance_url=$2
******************************************* +
+ File[/run/systemd/system/opam//0-opam-manage-shared-state-opam.ocaml.org.sh.sh] => + if $CMD repo --all --root $ROOT_DIR | grep -qx $instance_url; then
parameters => + $CMD update --root $ROOT_DIR
"ensure": "file"+ else
"group": "swhworker"+ $CMD init --reinit --bare --no-setup --root $ROOT_DIR $instance_name $instance_url
"mode": "0755"+ fi
"owner": "swhworker"+}
"content": >>>+
#!/usr/bin/env bash
# Managed by puppet class profile::swh::deploy::worker::loader_opam +function init_or_update_opam_instance () {
# Changes will be overwritten
# This script is in charge of bootstraping the + "Ensure opam root directory exists and references the main opam root folder with theepository as default opam
# repository.
set -e
CMD=/usr/bin/ + instance. If not, create it from scratch. If properly configured, update the opam
ROOT_DIR=/tmp/opam/ + repository.
INSTANCE=opam.ocaml.org +
INSTANCE_URL=https://opam.ocaml.org
# Opam instance is considered the main instance so we must initialize the repository + This assumes that the function init_or_update_opam_root already got called prior to
# if not present, otherwise we update it + calling this one."
( $CMD repo --all --root $ROOT_DIR | grep $INSTANCE_URL && $CMD update --root $ROOT_DIR ) \ +
|| $CMD init --reinit --bare --no-setup --root $ROOT_DIR $INSTANCE $INSTANCE_URL + instance_name=$1
<<< + instance_url=$2
******************************************* +
+ if $CMD repo --all --root $ROOT_DIR | grep -qx $instance_url; then
+ File[/run/systemd/system/opam] => + $CMD update --root $ROOT_DIR
parameters => + else
"ensure": "directory"+ $CMD repository add --root $ROOT_DIR $instance_name $instance_url
"group": "swhworker"+ fi
"mode": "0600"+}
"owner": "profile::swh::deploy::worker::loader_opam"+
******************************************* +init_or_update_opam_root opam.ocaml.org https://opam.ocaml.org
File[/usr/local/bin/opam-manage-shared-state.sh] => +
parameters => +
ensure => +init_or_update_opam_instance coq.inria.fr https://coq.inria.fr/opam/released
- file+
+ absent+init_or_update_opam_instance ocamlbench-repo https://github.com/OCamlPro/ocamlbench-repo.git
+
*******************************************
Service[opam-manage-shared-state-coq.inria.fr.timer] =>
parameters =>
enable =>
- true
+ false
*******************************************
Service[opam-manage-shared-state-ocamlbench-repo.timer] =>
parameters =>
enable =>
- true
+ false
*******************************************
Service[opam-manage-shared-state-opam.ocaml.org.timer] =>
parameters =>
enable =>
- true
+ false
*******************************************
+ Service[opam-manage-shared-state.timer] =>
parameters =>
"enable": true
"provider": "systemd"
*******************************************
Systemd::Timer[opam-manage-shared-state-coq.inria.fr.timer] =>
parameters =>
enable =>
- true
+ false
ensure =>
- present
+ absent
service_content =>
- # Opam manage shared state unit file
# Managed by puppet class profile::swh::deploy::worker::loader_opam
# Changes will be overwritten
[Unit]
Description=Software Heritage Manage OPAM shared state (coq.inria.fr)
Requires=network.target
After=network.target
[Service]
User=swhworker
Group=swhworker
Type=simple
ExecStart=/usr/local/bin/opam-manage-shared-state.sh coq.inria.fr https://coq.inria.fr/opam/released
[Install]
WantedBy=multi-user.target
timer_content =>
- [Install]
WantedBy=timers.target
[Timer]
OnCalendar=daily
AccuracySec=4h
Persistent=true
Unit=opam-manage-shared-state-coq.inria.fr.service
[Unit]
Description=Software Heritage Manage OPAM shared state (coq.inria.fr) timer
*******************************************
Systemd::Timer[opam-manage-shared-state-ocamlbench-repo.timer] =>
parameters =>
enable =>
- true
+ false
ensure =>
- present
+ absent
service_content =>
- # Opam manage shared state unit file
# Managed by puppet class profile::swh::deploy::worker::loader_opam
# Changes will be overwritten
[Unit]
Description=Software Heritage Manage OPAM shared state (ocamlbench-repo)
Requires=network.target
After=network.target
[Service]
User=swhworker
Group=swhworker
Type=simple
ExecStart=/usr/local/bin/opam-manage-shared-state.sh ocamlbench-repo https://github.com/OCamlPro/ocamlbench-repo.git
[Install]
WantedBy=multi-user.target
timer_content =>
- [Install]
WantedBy=timers.target
[Timer]
OnCalendar=daily
AccuracySec=4h
Persistent=true
Unit=opam-manage-shared-state-ocamlbench-repo.service
[Unit]
Description=Software Heritage Manage OPAM shared state (ocamlbench-repo) timer
*******************************************
Systemd::Timer[opam-manage-shared-state-opam.ocaml.org.timer] =>
parameters =>
enable =>
- true
+ false
ensure =>
- present
+ absent
service_content =>
- # Opam manage shared state unit file
# Managed by puppet class profile::swh::deploy::worker::loader_opam
# Changes will be overwritten
[Unit]
Description=Software Heritage Manage OPAM shared state (opam.ocaml.org)
Requires=network.target
After=network.target
[Service]
User=swhworker
Group=swhworker
Type=simple
ExecStart=/usr/local/bin/opam-manage-shared-state.sh opam.ocaml.org https://opam.ocaml.org
[Install]
WantedBy=multi-user.target
timer_content =>
- [Install]
WantedBy=timers.target
[Timer]
OnCalendar=daily
AccuracySec=4h
Persistent=true
Unit=opam-manage-shared-state-opam.ocaml.org.service
[Unit]
Description=Software Heritage Manage OPAM shared state (opam.ocaml.org) timer
*******************************************
+ Systemd::Timer[opam-manage-shared-state.timer] =>
parameters =>
"enable": true
"ensure": "present"
"group": "root"
"mode": "0444"
"owner": "root"
"path": "/etc/systemd/system"
"show_diff": true
"service_content": >>>
# Opam manage shared state unit file
# Managed by puppet class profile::swh::deploy::worker::loader_opam
# Changes will be overwritten
[Unit]
Description=Software Heritage Manage OPAM shared state
Requires=network.target
After=network.target
[Service]
User=swhworker
Group=swhworker
Type=simple
ExecStart=/usr/bin/run-parts /run/systemd/system/opam/local/bin/opam-manage-shared-state.sh
[Install]
WantedBy=multi-user.target
<<<
"timer_content": >>>
[Install]
WantedBy=timers.target
[Timer]
OnCalendar=daily
Persistent=true
# every ~4h
AccuracySec=4h
PersistentRandomizedDelaySec=1200
FixedRandomDelay=true
Unit=.service
[Unit]
Description=Software Heritage Manage OPAM shared state timer
<<<
*******************************************
- Systemd::Unit_file[opam-manage-shared-state-coq.inria.fr.service]
*******************************************
Systemd::Unit_file[opam-manage-shared-state-coq.inria.fr.timer] =>
parameters =>
content =>
- [Install]
WantedBy=timers.target
[Timer]
OnCalendar=daily
AccuracySec=4h
Persistent=true
Unit=opam-manage-shared-state-coq.inria.fr.service
[Unit]
Description=Software Heritage Manage OPAM shared state (coq.inria.fr) timer
enable =>
- true
+ false
ensure =>
- present
+ absent
*******************************************
- Systemd::Unit_file[opam-manage-shared-state-ocamlbench-repo.service]
*******************************************
Systemd::Unit_file[opam-manage-shared-state-ocamlbench-repo.timer] =>
parameters =>
content =>
- [Install]
WantedBy=timers.target
[Timer]
OnCalendar=daily
AccuracySec=4h
Persistent=true
Unit=opam-manage-shared-state-ocamlbench-repo.service
[Unit]
Description=Software Heritage Manage OPAM shared state (ocamlbench-repo) timer
enable =>
- true
+ false
ensure =>
- present
+ absent
*******************************************
- Systemd::Unit_file[opam-manage-shared-state-opam.ocaml.org.service]
*******************************************
Systemd::Unit_file[opam-manage-shared-state-opam.ocaml.org.timer] =>
parameters =>
content =>
- [Install]
WantedBy=timers.target
[Timer]
OnCalendar=daily
AccuracySec=4h
Persistent=true
Unit=opam-manage-shared-state-opam.ocaml.org.service
[Unit]
Description=Software Heritage Manage OPAM shared state (opam.ocaml.org) timer
enable =>
- true
+ false
ensure =>
- present
+ absent
*******************************************
+ Systemd::Unit_file[opam-manage-shared-state.service] =>
parameters =>
"ensure": "present"
"group": "root"
"mode": "0444"
"owner": "root"
"path": "/etc/systemd/system"
"show_diff": true
"content": >>>
# Opam manage shared state unit file
# Managed by puppet class profile::swh::deploy::worker::loader_opam
# Changes will be overwritten
[Unit]
Description=Software Heritage Manage OPAM shared state
Requires=network.target
After=network.target
[Service]
User=swhworker
Group=swhworker
Type=simple
ExecStart=/usr/bin/run-parts /run/systemd/system/opam/local/bin/opam-manage-shared-state.sh
[Install]
WantedBy=multi-user.target
<<<
*******************************************
+ Systemd::Unit_file[opam-manage-shared-state.timer] =>
parameters =>
"enable": true
"ensure": "present"
"group": "root"
"mode": "0444"
"owner": "root"
"path": "/etc/systemd/system"
"show_diff": true
"content": >>>
[Install]
WantedBy=timers.target
[Timer]
OnCalendar=daily
Persistent=true
# every ~4h
AccuracySec=4h
PersistentRandomizedDelaySec=1200
FixedRandomDelay=true
Unit=.service
[Unit]
Description=Software Heritage Manage OPAM shared state timer
<<<
*******************************************
*** End octocatalog-diff on worker01.softwareheritage.org
```