Page MenuHomePhabricator

scap overrides for deploy-local using -D parameter fail
Closed, ResolvedPublic1 Estimated Story Points

Description

When reimaging restbase1019 for T295375, puppet runs began to fail. This was out of step with my experience of other reimages, which makes me think this was a recent change. Removing the -D log_json:false argument deployed the services as expected, but this might be indicative of other breakage in scap. Currently we use this argument for all puppet-installed scap services so this will probably break other services if new deploys or reimages are undertaken in future.

Output can be seen in this paste with the override failing and then the install succeeding once the parameter is removed.
https://phabricator.wikimedia.org/P19367

Event Timeline

hnowlan renamed this task from scap overrides appear to be broken to scap overrides for deploy-local using -D parameter fail.Jan 26 2022, 6:14 PM

Change 757510 had a related patch set uploaded (by Ahmon Dancy; author: Ahmon Dancy):

[mediawiki/tools/scap@master] deploy: Don't call dict() on self.arguments.defines

https://gerrit.wikimedia.org/r/757510

Change 757510 merged by jenkins-bot:

[mediawiki/tools/scap@master] deploy: Don't call dict() on self.arguments.defines

https://gerrit.wikimedia.org/r/757510

dancy changed the task status from Open to In Progress.Jan 26 2022, 7:44 PM
dancy triaged this task as High priority.
dancy set the point value for this task to 1.
dancy set Final Story Points to 1.

This problem should be fixed now.

I think I'm still seeing this in 4.2.1 I'm afraid:

hnowlan@restbase1020:~$ sudo -u deploy-service /usr/bin/scap deploy-local --repo cassandra/twcs -D log_json:False
WARNING:deploy-local:Unhandled error:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/scap/cli.py", line 357, in run
    app._load_config()
  File "/usr/lib/python3/dist-packages/scap/deploy.py", line 119, in _load_config
    overrides.update(self.arguments.defines)
ValueError: dictionary update sequence element #0 has length 14; 2 is required
ERROR:deploy-local:deploy-local failed: <ValueError> dictionary update sequence element #0 has length 14; 2 is required
hnowlan@restbase1020:~$ dpkg -l scap
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-===========================================
ii  scap           4.2.1-1      all          Deployment toolchain for Wikimedia projects

Sorry about this @hnowlan I will investigate more deeply.

dancy reopened this task as In Progress.Jan 28 2022, 3:40 PM

Change 757933 had a related patch set uploaded (by Ahmon Dancy; author: Ahmon Dancy):

[mediawiki/tools/scap@master] scap deploy: Fix -D option handling (really this time)

https://gerrit.wikimedia.org/r/757933

Change 757933 merged by jenkins-bot:

[mediawiki/tools/scap@master] scap deploy: Fix -D option handling (really this time)

https://gerrit.wikimedia.org/r/757933

I think the changes have resolved this issue, I provisioned a new host without issue. Thanks very much for the quick fix!