Staging instance, all changes can be removed at any time

Skip to content

Add waagent profile to azure worker role

So we are able to activate swap for indexer workers.

Related to T4415 Depends on !545 (closed)

Test Plan

bin/octo on indexer-workers adapts the swap configuration:

$ $SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff vault-worker01.euwest.azure.internal.softwareheritage.org
...
*******************************************
+ File[/etc/waagent.conf] =>
   parameters =>
     "ensure": "present",
     "group": "root",
     "mode": "0644",
     "owner": "root"
*******************************************
+ File_line[ResourceDisk.EnableSwap] =>
   parameters =>
     "ensure": "present",
     "line": "ResourceDisk.EnableSwap=y",
     "match": "^ResourceDisk.EnableSwap=n",
     "path": "/etc/waagent.conf"
*******************************************
+ File_line[ResourceDisk.SwapSizeMB] =>
   parameters =>
     "ensure": "present",
     "line": "ResourceDisk.SwapSizeMB=14336",
     "match": "^ResourceDisk.SwapSizeMB=0",
     "path": "/etc/waagent.conf"
*******************************************
*** End octocatalog-diff on indexer-worker01.euwest.azure.internal.softwareheritage.org

bin/octo on azure worker without configuration manages the waagent.conf without activating swap:

$ $SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff vault-worker01.euwest.azure.internal.softwareheritage.org
...
*******************************************
+ File[/etc/waagent.conf] =>
   parameters =>
     "ensure": "present",
     "group": "root",
     "mode": "0644",
     "owner": "root"
*******************************************
+ File_line[/etc/waagent.conf-ResourceDisk.EnableSwap] =>
   parameters =>
     "ensure": "present",
     "line": "ResourceDisk.EnableSwap=n",
     "match": "^ResourceDisk\\.EnableSwap=",
     "path": "/etc/waagent.conf"
*******************************************
+ File_line[/etc/waagent.conf-ResourceDisk.SwapSizeMB] =>
   parameters =>
     "ensure": "present",
     "line": "ResourceDisk.SwapSizeMB=0",
     "match": "^ResourceDisk\\.SwapSizeMB=",
     "path": "/etc/waagent.conf"
*******************************************
*** End octocatalog-diff on vault-worker01.euwest.azure.internal.softwareheritage.org

Migrated from D8170 (view on Phabricator)

Merge request reports

Loading