lxc / go-lxc

Go bindings for liblxc
https://linuxcontainers.org/lxc
Other
430 stars 76 forks source link

Fixed error for creating loopback storage devices #148

Closed 3lding closed 3 years ago

3lding commented 3 years ago

Hello,

I was able to fix my submitted Issue #147. There was only one little modification needed to apply on type.go. Now the loopback storage device can be created without any issues.

I changed this because in the manual the backingstore name is also called loop so I tried it with renaming it from loopback to loop and after building and testing it the container was created with its loopback storage.

2021/03/05 02:02:45 Creating container...
debootstrap is /usr/sbin/debootstrap
Checking cache download in /var/cache/lxc/debian/rootfs-buster-amd64 ...
Downloading debian minimal ...
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id 6D33866EDD8FFA41C0143AEDDCC9EFBF77E11517)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://deb.debian.org/debian...
[...]
I: Base system installed successfully.
Download complete.
Copying rootfs to /usr/lib/x86_64-linux-gnu/lxc/rootfs...Generating locales (this might take a while)...
  en_US.UTF-8... done
  en_US.UTF-8... done
Generation complete.
update-rc.d: error: cannot find a LSB script for checkroot.sh
update-rc.d: error: cannot find a LSB script for umountfs
Failed to disable unit, unit hwclock.sh.service does not exist.
update-rc.d: error: cannot find a LSB script for hwclockfirst.sh
Creating SSH2 RSA key; this may take some time ...
2048 SHA256:Y8EXWCpzsr3j9kLIDGmhBCuIOBXLi72QkDbd/bNCJQo root@fincpx11 (RSA)
Creating SSH2 ECDSA key; this may take some time ...
256 SHA256:rHZKZ78C8iRw9IPxk0SxgW6fN0BDFsD0H/r5hpDwLTk root@fincpx11 (ECDSA)
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:Ai77LtIsPUOWIeLERDbriM3eqo0cQblouCZCMNlyg30 root@fincpx11 (ED25519)
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.

Current default time zone: 'Etc/UTC'
Local time is now:      Fri Mar  5 01:04:04 UTC 2021.
Universal Time is now:  Fri Mar  5 01:04:04 UTC 2021.
stgraber commented 3 years ago

Can you update your commit message to include the required Signed-off-by: Firstname Lastname <email> line?

3lding commented 3 years ago

Can you update your commit message to include the required Signed-off-by: Firstname Lastname <email> line?

@stgraber done 👍🏻

stgraber commented 3 years ago

Forgot to push? I still just see the one commit.

stgraber commented 3 years ago

Ah, not quite what I had in mind. I don't mind adding this entry to the .gitignore, I just don't want it to be part of the commit that's fixing the loopback issue.

Instead I'd expect to have two commits in this branch:

3lding commented 3 years ago

Ah, not quite what I had in mind. I don't mind adding this entry to the .gitignore, I just don't want it to be part of the commit that's fixing the loopback issue.

Instead I'd expect to have two commits in this branch:

* gitignore: Add .idea

* Fix error when creating loopback bdev

Oh sorry. Should I recreate the branch and open a new pull request instead?

3lding commented 3 years ago

Ah, not quite what I had in mind. I don't mind adding this entry to the .gitignore, I just don't want it to be part of the commit that's fixing the loopback issue.

Instead I'd expect to have two commits in this branch:

* gitignore: Add .idea

* Fix error when creating loopback bdev

Now all should be correct 👍🏻

stgraber commented 3 years ago

Looks good, thanks!