Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upgrade boxes for SecureDrop 1.1.0 #4950

Merged
merged 2 commits into from
Oct 24, 2019
Merged

Conversation

emkll
Copy link
Contributor

@emkll emkll commented Oct 22, 2019

Status

Ready for review

Description of Changes

Closes #4887

Add upgrade boxes for SecureDrop 1.1.0

Testing

  • make upgrade start
  • Source interface is accessible over Tor v3 service and version string is 1.1.0
  • make build-debs
  • make upgrade-test-local succeeds
  • Source and journalist interfaces come up, version string is 1.2.0~rc1

Deployment

Dev env only

If you made non-trivial code changes:

  • I have written a test plan and validated it for this PR

@kushaldas
Copy link
Contributor

My Vagrant + libvirt + molecule setup decided not to play together :(

@redshiftzero
Copy link
Contributor

hey @kushaldas - can you explain what problem(s) you encountered so that we can try to resolve them?

@kushaldas
Copy link
Contributor

can you explain what problem(s) you encountered so that we can try to resolve them?

Just regular odd molecule + vagrant + libvirt errors.

For example:

### 2019-10-24 12:20:06 ###
### 2019-10-24 12:20:06 ###
An action 'up' was attempted on the machine 'app-staging',
but another process is already executing an action on the machine.
Vagrant locks each machine for access by only one process at a time.
Please wait until the other Vagrant process finishes modifying this
machine, then try again.

If you believe this message is in error, please check the process
listing for any "ruby" or "vagrant" processes and kill them. Then
try again.

### 2019-10-24 12:20:19 ###
### 2019-10-24 12:20:19 ###
Volume for domain is already created. Please run 'vagrant destroy' first.

Everytime for a different VM in the molecule run, means again trying to clean up first and then trying to re-run the whole scenario (make upgrade-start). molecule destroy -s upgrade or other destroy commands also can not shutdown vms properly and make the system un-usable (same behavior from last year).

@redshiftzero
Copy link
Contributor

can you provide steps to reproduce for getting to either of those error messages? I think it's worth identifying if the challenge here is insufficient documentation, upstream issues, or shortcomings of our development environments that we should resolve.

@rmol
Copy link
Contributor

rmol commented Oct 24, 2019

@kushaldas I've had the same sort of trouble with Vagrant, though I'm not sure if libvirt shares any of the blame. I'm pretty sure I saw this back when I was using Vagrant and Virtualbox. As the error message suggests, I can usually get the Molecule commands to complete after killing those stuck processes. And sometimes cleaning up in virt-manager or virsh.

@kushaldas
Copy link
Contributor

@kushaldas I've had the same sort of trouble with Vagrant, though I'm not sure if libvirt shares any of the blame. I'm pretty sure I saw this back when I was using Vagrant and Virtualbox. As the error message suggests, I can usually get the Molecule commands to complete after killing those stuck processes. And sometimes cleaning up in virt-manager or virsh.

Yes, I generally managed to fix those following the similar commands as you suggested and also using reboot. This time I tried for around 2 hours and just gave up for today. I will try to fix this in morning when my brain is fresh :)

@kushaldas
Copy link
Contributor

can you provide steps to reproduce for getting to either of those error messages? I think it's worth identifying if the challenge here is insufficient documentation, upstream issues, or shortcomings of our development environments that we should resolve.

I don't see any proper reproducer, sometimes it happens with any molecule converge command and sometimes it does not.

@rmol
Copy link
Contributor

rmol commented Oct 24, 2019

OK. I'll try to review this.

The Ansible version bump in SD 1.1.0 didn't include required changes to
the "upgrade" scenario. Updated in order to test the 1.1.0 upgrade
boxes. The scenario now completes without issue.
@conorsch
Copy link
Contributor

Ran through the test plan here to evaluate libvirt behavior. Encountered no problems running the VM tooling. Further changes appear to be required, however. Results of testing:

  • make upgrade start
  • Source interface is accessible over Tor v3 service and version string is 1.1.0
  • make build-debs
  • make upgrade-test-local succeeds
  • Source and journalist interfaces come up, version string is 1.2.0~rc1

There was a small tweak required for Ansible 2.7 compatibility, specifically within the upgrade scenario, which I've pushed.

Regarding the libvirt problems reported above, that's most likely related to Molecule's use of an "ephemeral" directory for tracking VM state. During "create/converge" actions, Molecule writes YAML files containing VM information to /tmp/. After a reboot, that state info will be destroyed, but the VM volumes will still exist in libvirt's directories. So a subsequent "create/converge" action will result in Molecule requesting a new VM be created, but libvirt will refuse, since it's already aware of a volume matching the requested name. To resolve, use virt-manager to clean up old VMs, or run virsh and purge the volumes manually. To prevent the issue, make sure to clean up VMs when you're done with them. For example, after using the upgrade scenario: molecule destroy -s upgrade.

Copy link
Contributor

@conorsch conorsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@redshiftzero redshiftzero merged commit e4c9784 into develop Oct 24, 2019
@redshiftzero redshiftzero deleted the 4887-100-upgrade-boxes branch October 24, 2019 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release SecureDrop 1.1.0
5 participants