Update scap vagrant setup
ClosedPublic

Authored by thcipriani on Oct 30 2017, 11:42 PM.

Details

Reviewers
demon
mmodell
Group Reviewers
Release-Engineering-Team
Commits
rSCAPVAGRANT80f143e6011a: Update scap vagrant setup
Patch without arc
git checkout -b D864 && curl -L https://phabricator.wikimedia.org/D864?download=true | git apply
Summary

Moves the base box to stretch to support new git versions, updates
dependencies, and lxc-{copy,clone} fiddling.

Diff Detail

Repository
rSCAPVAGRANT scap-vagrant
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2471
Build 4068: arc lint + arc unit
thcipriani created this revision.Oct 30 2017, 11:42 PM
Restricted Application added a reviewer: Release-Engineering-Team. · View Herald TranscriptOct 30 2017, 11:42 PM
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript

Is this the same as https://phabricator.wikimedia.org/D863 ? but includes extra's?

demon added inline comments.
Vagrantfile
24

No such box, I swapped back to using one of the Bento ones: bento/debian-9.2

thcipriani updated this revision to Diff 2276.Oct 31 2017, 2:41 AM

Use bento/debian-9.2

In D864#17135, @Paladox wrote:

Is this the same as https://phabricator.wikimedia.org/D863 ? but includes extra's?

Whoops. Yep. @demon and I were working on it together in IRC.

thcipriani updated this revision to Diff 2277.Oct 31 2017, 2:46 AM

Sort packages correctly

demon added a comment.Oct 31 2017, 4:03 AM

Works, but turns out a fresh provision was broken anyway by scap prep:

==> default: Cloning scap into the deployment directory
==> default: Setting up Rsync server
==> default: Cloning https://gerrit.wikimedia.org/r/operations/mediawiki-config to /srv/mediawiki-staging
==> default: Faking /etc/wikimedia-cluster
==> default: Setting up php-master mediawiki checkout
==> default: 23:54:20 Unhandled error:
==> default: Traceback (most recent call last):
==> default:   File "/srv/deployment/scap/scap/scap/cli.py", line 329, in run
==> default:     exit_status = app.main(app.extra_arguments)
==> default:   File "/srv/mediawiki-staging/scap/plugins/prep.py", line 93, in main
==> default:     old_branch = self.active_wikiversions().keys()[0]
==> default:   File "/srv/deployment/scap/scap/scap/cli.py", line 152, in active_wikiversions
==> default:     self.config['wmf_realm'], self.config['datacenter'])
==> default:   File "/srv/deployment/scap/scap/scap/utils.py", line 789, in get_active_wikiversions
==> default:     with open(path) as f:
==> default: IOError: [Errno 2] No such file or directory: '/srv/mediawiki/wikiversions.json'
==> default: 23:54:20 prep failed: <IOError> [Errno 2] No such file or directory: '/srv/mediawiki/wikiversions.json'
==> default: 
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
In D864#17164, @demon wrote:

Works, but turns out a fresh provision was broken anyway by scap prep:

==> default: Cloning scap into the deployment directory
==> default: Setting up Rsync server
==> default: Cloning https://gerrit.wikimedia.org/r/operations/mediawiki-config to /srv/mediawiki-staging
==> default: Faking /etc/wikimedia-cluster
==> default: Setting up php-master mediawiki checkout
==> default: 23:54:20 Unhandled error:
==> default: Traceback (most recent call last):
==> default:   File "/srv/deployment/scap/scap/scap/cli.py", line 329, in run
==> default:     exit_status = app.main(app.extra_arguments)
==> default:   File "/srv/mediawiki-staging/scap/plugins/prep.py", line 93, in main
==> default:     old_branch = self.active_wikiversions().keys()[0]
==> default:   File "/srv/deployment/scap/scap/scap/cli.py", line 152, in active_wikiversions
==> default:     self.config['wmf_realm'], self.config['datacenter'])
==> default:   File "/srv/deployment/scap/scap/scap/utils.py", line 789, in get_active_wikiversions
==> default:     with open(path) as f:
==> default: IOError: [Errno 2] No such file or directory: '/srv/mediawiki/wikiversions.json'
==> default: 23:54:20 prep failed: <IOError> [Errno 2] No such file or directory: '/srv/mediawiki/wikiversions.json'
==> default: 
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Hopefully, addressed with: https://gerrit.wikimedia.org/r/#/c/387743/1 -- still provisioning though (soooo many extensions!)

demon added a comment.Nov 6 2017, 4:53 PM

That helps and would fix the next failure, but it's not the actual fix we need. It's actually the call to active_wikiversions() that breaks things.

demon accepted this revision.Nov 6 2017, 4:54 PM

I'm inlined to approve this as-is, as it unbreaks most things, the remaining broken parts are in scap/plugins mostly.

This revision is now accepted and ready to land.Nov 6 2017, 4:54 PM
thcipriani closed this revision.Nov 7 2017, 4:31 PM