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

Port forwarding rules are not restored after rollback of a running system #49

Open
flavio opened this issue Jun 9, 2015 · 5 comments
Open

Comments

@flavio
Copy link

flavio commented Jun 9, 2015

How to reproduce the issue:

  • create a Vagrantfile using port forwarding
  • vagrant up => port forwarding works
  • vagrant sandbox on
  • vagrant sandbox commit
  • vagrant halt -f
  • vagrant sandbox rollback => port forwarding rule is not restored

I noticed this behaviour when using the libvirt provider.

@sciurus
Copy link
Contributor

sciurus commented Jun 11, 2015

Aren'y you missing a step at the end? You ran vagrant halt, so the vm is stopped when you ran vagrant sandbox rollback. You need to run vagrant up afterwards, then the VM should start and port forwarding should be restored.

@flavio flavio changed the title Port forwarding rules are not restored after rollback Port forwarding rules are not restored after rollback of a running system Jun 11, 2015
@flavio
Copy link
Author

flavio commented Jun 11, 2015

Nope, I took the snapshot while the system was running. Rolling back brings the system online immediately, there's no need to do a up.

Taking a snapshot of a powered off system, doing a rollback, doing up works like a charm.

I changed the title accordingly.

@sciurus
Copy link
Contributor

sciurus commented Jun 12, 2015

Port forwarding in vagrant-libvirt starts an SSH process on your host computer. Running "vagrant halt -f" is going to kill its connection to the guest. Vagrant-libvirt should restart the SSH process for port forwarding the next time you run "vagrant up".

@flavio
Copy link
Author

flavio commented Jun 12, 2015

Vagrant-libvirt should restart the SSH process for port forwarding the next time you run "vagrant up".

And that's exactly what it does.

The problem is different.

I take a snapshot using sahara while the image is running. Then I halt the image (doesn't matter how). The next time I rollback sahara will automatically restore the system in a running state (there's not need to do a vagrant up). Now all the port forwarding rules are missing.

I peeked a bit into the code, sahara implements rollback using fog. libvirt-vagrant is not involved, hence the port forwarding rules are not restored by it.

@sciurus
Copy link
Contributor

sciurus commented Jun 14, 2015

Exactly.

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

No branches or pull requests

2 participants