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

LXC refactor fixes #9

Merged
merged 3 commits into from
Jan 12, 2015
Merged

Conversation

EvaSDK
Copy link

@EvaSDK EvaSDK commented Jan 12, 2015

As requested in saltstack/salt issue saltstack#14865, I have been testing the lxc-refactor branch.

Here are a few fixes I had to apply to have a successful run of salt-call state.sls cloud.

There are two more points that are not in this PR but need to be discussed as I have no idea how to do it right now.

  1. On my distribution (Gentoo), lxc configuration is located in /etc/lxc. This is fine since there is effectively only configuration files there for me but this is not configurable in Salt. How would I go about fixing that ? For now, I am just fixing it locally using sed.
  2. lxc-clone is blocking salt-call with a silly question. It detects a filesystem signature on the LV after I created the silly folder for it to mount the one to clone from (which is based on LV name, not rootfs...) and asks if I want to wipe it. I haven't found a documented option to force it to proceed. It seems like echoing to fd 0 of the process made it continue but this is not ideal.

Here is the output of lxc-clone for reference:

# lxc-clone --help
Usage: lxc-clone [-s] [-B backingstore] [-L size[unit]] [-K] [-M] [-H]
          [-p lxcpath] [-P newlxcpath] orig new

  -s: snapshot rather than copy
  -B: use specified new backingstore.  Default is the same as
      the original.  Options include aufs, btrfs, lvm, overlayfs,
      dir and loop
  -L: for blockdev-backed backingstore, use specified size * specified
      unit. Default size is the size of the source blockdev, default
      unit is MB
  -K: Keep name - do not change the container name
  -M: Keep macaddr - do not choose a random new mac address
  -p: use container orig from custom lxcpath
  -P: create container new in custom lxcpath

I have only tested with a clone for now so there might be more issues than that.

Last occurence after rewrite.
This option does not exist in lxc-clone from lxc 1.0.7.
This is a workaround for issue saltstack#14865 not being fixed yet it seems.

From a pure coverage point of view, this makes sense anyway as there is
a set of conditions that lead to this problem. Using a defaultdict could
solve the problem equally.
@terminalmage
Copy link
Owner

Ahh, good catches.

With regards to the LVM warning, I have seen this as well I think. Are you seeing a message saying that there is already a logical volume by the desired name?

@terminalmage terminalmage merged this pull request into terminalmage:lxc-refactor Jan 12, 2015
@EvaSDK
Copy link
Author

EvaSDK commented Jan 12, 2015

Nope, it prints

# lxc-clone -o buildd.gentoo -n buildd.gentoo-2 -L 8G
WARNING: ext4 signature detected on /dev/seta/vm.buildd.gentoo-2 at offset 1080. Wipe it? [y/n]:

Of course output varies according to last time the blocks allocated by LVM were used for.

@EvaSDK
Copy link
Author

EvaSDK commented Jan 12, 2015

Also, for the default seed value, do you have any hint why it would be unset at this point, I needed this hack to get things working but I bet there is a good explanation for this case to occur.

terminalmage pushed a commit that referenced this pull request Apr 30, 2015
Added list_hba() function to list all HBAs on provider, HBAs by host, HBAs on provider by type, or HBAs on host by type.
@EvaSDK EvaSDK deleted the lxc-refactor branch August 1, 2015 13:55
terminalmage pushed a commit that referenced this pull request Sep 29, 2015
Fixed some index numbers to fix some errors.
terminalmage pushed a commit that referenced this pull request May 13, 2016
Fix for "TypeError: send() got an unexpected keyword argument 'raw'"
terminalmage pushed a commit that referenced this pull request Feb 10, 2017
Add optional args from jnpr.junos.Device to proxy module
terminalmage pushed a commit that referenced this pull request Dec 12, 2017
[WIP] Create Unit Test pattern for NAPALM modules
terminalmage pushed a commit that referenced this pull request May 4, 2018
dwoz added a commit that referenced this pull request Dec 3, 2019
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.

2 participants