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

[BUG] Pot prepare is broken in pot 0.11 #88

Closed
Crest opened this issue Apr 30, 2020 · 3 comments · Fixed by #90
Closed

[BUG] Pot prepare is broken in pot 0.11 #88

Crest opened this issue Apr 30, 2020 · 3 comments · Fixed by #90
Labels

Comments

@Crest
Copy link
Contributor

Crest commented Apr 30, 2020

Describe the bug
Pot 0.11 introduced the new 'pot.stack' parameter to jail configurations. Pot prepare creates a jail 'pot.conf' with two 'pot.stack=ipv4' lines breaking pot start $jail. It doesn't create the epair interface required to attach the jail to the public bridge.

To Reproduce
Steps to reproduce the behavior:

  1. Create a pot with network type inherit.
  2. Export the pot as image.
  3. Prepare a jail from the image.
  4. Start the jail.
  5. The enter the jail and run ifconfig -l.
  6. Run ifconfig -l on the host.
  7. There neither contain either end of an epair interface for the jail.
  8. Run fgrep pot.stack $jail_pot_conf | wc -l on the jail pot.conf. It returns two instead of the expected single line.
  9. Manually removing one of the offending 'pot.stack=ipv4' lines allows the jail to start as expected.

Expected behavior
Pot prepare should continue to work like it did in pot 0.10. It should create a epair, add one end to the bridge and pass the other end to the jail's network stack. Extending the new support for IPv6 and IPv6+IPv4 to prepared jails would be nice to have.

@Crest Crest added the bug label Apr 30, 2020
@pizzamig
Copy link
Collaborator

Thanks for reporting. prepare is not yet part of the CI and I didn't detected this regression.
It's a bug in clone, a fix is on the way

While here, I'm going to add the -S option for the network stack to prepare as well

@pizzamig
Copy link
Collaborator

pizzamig commented May 1, 2020

Tests are successful, I'm preparing a fix release.

@pizzamig pizzamig closed this as completed May 1, 2020
@Crest
Copy link
Contributor Author

Crest commented May 22, 2020

The bugfix added a new bug. A pipe at the end of the line is missing causing two grep calls to be combined into one grep call with the arguments of both.

Crest added a commit to Crest/pot that referenced this issue May 22, 2020
The original fix for bsdpot#88 introduced a new bug in the form of a
missing pipe before a line continuation. This combined the
arguments for two grep calls into one.

Clean up the code by using a single grep -vE instead of multiple
piped grep -v.

Fixes bsdpot#88.
pizzamig pushed a commit that referenced this issue May 25, 2020
The original fix for #88 introduced a new bug in the form of a
missing pipe before a line continuation. This combined the
arguments for two grep calls into one.

Clean up the code by using a single grep -vE instead of multiple
piped grep -v.

Fixes #88.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants