]> git.proxmox.com Git - pve-container.git/log
pve-container.git
5 years agod/control: bump version dependency of libpve-common-perl
Thomas Lamprecht [Mon, 4 Feb 2019 11:02:51 +0000 (12:02 +0100)]
d/control: bump version dependency of libpve-common-perl

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix #2080: fix device encoding in the prestart hook
Wolfgang Bumiller [Mon, 4 Feb 2019 09:42:02 +0000 (10:42 +0100)]
fix #2080: fix device encoding in the prestart hook

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobump version to 2.0-34
Thomas Lamprecht [Fri, 1 Feb 2019 12:14:18 +0000 (13:14 +0100)]
bump version to 2.0-34

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agod/control: bump version dependency of libpve-guest-common-perl
Thomas Lamprecht [Fri, 1 Feb 2019 12:08:32 +0000 (13:08 +0100)]
d/control: bump version dependency of libpve-guest-common-perl

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd pre- start/stop hookscript to containers
Dominik Csapak [Thu, 31 Jan 2019 13:33:40 +0000 (14:33 +0100)]
add pre- start/stop hookscript to containers

this adds the config (hookscript) and executes it on four points in
time for the container:

'pre-start'
'post-start'
'pre-stop'
'post-stop'

on pre-start we abort if the script fails and pre-stop will not be
called if the vm crashes or if the vm gets powered off from inside
the guest

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agofixup: slight code cleanup
Thomas Lamprecht [Wed, 30 Jan 2019 13:53:37 +0000 (14:53 +0100)]
fixup: slight code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofixup indentation
Thomas Lamprecht [Wed, 30 Jan 2019 13:53:20 +0000 (14:53 +0100)]
fixup indentation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoAdd debian/SOURCE to docs
Rhonda D'Vine [Wed, 30 Jan 2019 13:41:34 +0000 (14:41 +0100)]
Add debian/SOURCE to docs

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
5 years agoFix #1924: add snapshot parameter
Rhonda D'Vine [Wed, 30 Jan 2019 13:41:33 +0000 (14:41 +0100)]
Fix #1924: add snapshot parameter

The pct CLI command offer the config function. The output of that may
vary with respect to a given snapshot. This adds a switch that shows the
corresponding snapshot's config.

The code needs a newer libpve-guest-common-perl, thus bumping the
dependency.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
5 years agofix #889: api create: reserver config with create lock early
Thomas Lamprecht [Mon, 28 Jan 2019 07:06:48 +0000 (08:06 +0100)]
fix #889: api create: reserver config with create lock early

allows to remove some checks as we can be sure the config belongs to
us once we have it resered, either for restore or new creation.

This is similar to the qemu-server approach[0][1], adapted to the
LXC code. We need to cleanup a bit less if something fails, as the
LXC code path always removed the config and all created volumes in
this case, which means the 'create' reserve lock is gone too.

The early reserve on API entry, instead of doing it after forked
worker entry, allows to workaround the issues reported in #889 as
successful return from the API call means that the VMID is locked.

[0]: https://git.proxmox.com/?p=qemu-server.git;a=commit;h=8ba8418ca1d1a76a7e24c34045ca7702b0cd969d
[1]: https://git.proxmox.com/?p=qemu-server.git;a=commit;h=4fedc13b453d2011b35352df246cf9ea396e942b

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agodestroy_config: die if unlink fails
Thomas Lamprecht [Mon, 28 Jan 2019 07:06:47 +0000 (08:06 +0100)]
destroy_config: die if unlink fails

We use this in two places, in the cleanup path of the create/restore
API path and indirectly through PVE::LXC::destroy_lxc_container, once
again in the restore code path of the create API call, to cleanup a
CT before overwriting it with a backup if the force flag ist set. The
second time in the destroy CT API call, both times a hard error in a
erroneous cleanup is wanted.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi/create: trivial: move worker name out
Thomas Lamprecht [Sat, 26 Jan 2019 13:28:00 +0000 (14:28 +0100)]
api/create: trivial: move worker name out

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoapi/create: empty newline cleanup
Thomas Lamprecht [Sat, 26 Jan 2019 12:27:40 +0000 (13:27 +0100)]
api/create: empty newline cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 2.0-33
Wolfgang Bumiller [Mon, 7 Jan 2019 14:37:19 +0000 (15:37 +0100)]
bump version to 2.0-33

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobuildsys: use dpkg-parsechangelog
Wolfgang Bumiller [Mon, 7 Jan 2019 14:36:11 +0000 (15:36 +0100)]
buildsys: use dpkg-parsechangelog

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoonly recover id mapping on restore
Wolfgang Bumiller [Mon, 7 Jan 2019 14:32:42 +0000 (15:32 +0100)]
only recover id mapping on restore

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoclose #1785: whitelist namespaced lxc.sysfs.* entries
Wolfgang Bumiller [Fri, 4 Jan 2019 11:35:27 +0000 (12:35 +0100)]
close #1785: whitelist namespaced lxc.sysfs.* entries

According do namespaces(7) these should be namespaced (iow.
changing these values on the host they are not propagated to
running containers), so it makes sense to whitelist them.

Note that these only work when also using
'lxc.mount.auto: proc:rw'

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Link: https://github.com/lxc/lxc/issues/989
5 years agobump version to 2.0-32
Thomas Lamprecht [Mon, 7 Jan 2019 12:48:35 +0000 (13:48 +0100)]
bump version to 2.0-32

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd informative comment...
Wolfgang Bumiller [Fri, 4 Jan 2019 10:17:10 +0000 (11:17 +0100)]
add informative comment...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofixup comment about early lxc.idmap recovery
Wolfgang Bumiller [Thu, 27 Dec 2018 12:55:46 +0000 (13:55 +0100)]
fixup comment about early lxc.idmap recovery

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agocleanup: factor out root@pam check
Wolfgang Bumiller [Thu, 27 Dec 2018 12:53:53 +0000 (13:53 +0100)]
cleanup: factor out root@pam check

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoarray usage fixup
Wolfgang Bumiller [Thu, 27 Dec 2018 13:18:49 +0000 (14:18 +0100)]
array usage fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix #2028: keep custom uid mapping during restore
Oguz Bektas [Thu, 27 Dec 2018 11:52:25 +0000 (12:52 +0100)]
fix #2028: keep custom uid mapping during restore

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
5 years agofix #2014: don't check if unpriv for blkio
Oguz Bektas [Fri, 7 Dec 2018 10:34:42 +0000 (11:34 +0100)]
fix #2014: don't check if unpriv for blkio

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
5 years agobump version to 2.0-31
Thomas Lamprecht [Thu, 29 Nov 2018 11:58:25 +0000 (12:58 +0100)]
bump version to 2.0-31

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd features:fuse
Wolfgang Bumiller [Wed, 28 Nov 2018 12:55:06 +0000 (13:55 +0100)]
add features:fuse

That should be enough for snapd on unprivileged containers.
For privileged containers we'd also need a way to not drop
the mac_admin capability - not sure we'd want that.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoClose #1234: pct: implement rescan
Alwin Antreich [Mon, 12 Nov 2018 14:11:12 +0000 (15:11 +0100)]
Close #1234: pct: implement rescan

This patch implements the same feature as for qm 'rescan'.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
5 years agobump version to 2.0-30
Thomas Lamprecht [Fri, 9 Nov 2018 16:38:41 +0000 (17:38 +0100)]
bump version to 2.0-30

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agocall map_volume before using volumes.
Dietmar Maurer [Thu, 8 Nov 2018 13:05:16 +0000 (14:05 +0100)]
call map_volume before using volumes.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoallow fedora 29
David Limbeck [Fri, 9 Nov 2018 12:53:30 +0000 (13:53 +0100)]
allow fedora 29

tested start/stop of container as well as ipv4 and ipv6 static addresses

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
5 years agofix #1808: readonly mount source disk
David Limbeck [Tue, 30 Oct 2018 12:06:38 +0000 (13:06 +0100)]
fix #1808: readonly mount source disk

Always readonly mount the source disk so a full clone still works with
an immutable base disk. Applies to every disk copy.

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
5 years agobump version to 2.0-29
Dietmar Maurer [Mon, 22 Oct 2018 08:24:55 +0000 (10:24 +0200)]
bump version to 2.0-29

5 years agoadd Ubuntu 18.10 (Cosmic Cuttlefish) support
Thomas Lamprecht [Wed, 17 Oct 2018 09:10:21 +0000 (11:10 +0200)]
add Ubuntu 18.10 (Cosmic Cuttlefish) support

install/start/network works for unprivileged and privileged.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofollowup whitespace cleanup
Thomas Lamprecht [Tue, 9 Oct 2018 13:05:50 +0000 (15:05 +0200)]
followup whitespace cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoclose #1940: pct console: added ability to specify escape sequence
Tim Marx [Tue, 9 Oct 2018 11:34:14 +0000 (13:34 +0200)]
close #1940: pct console: added ability to specify escape sequence

added clarification about behavior when passing -1 to escapechar
restored former behavior in other uses of get_console_command
added meaningful tag to commit message

Signed-off-by: Tim Marx <t.marx@proxmox.com>
5 years agobump version to 2.0-28
Thomas Lamprecht [Wed, 3 Oct 2018 14:46:54 +0000 (16:46 +0200)]
bump version to 2.0-28

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd feature flags using apparmor profile generation
Wolfgang Bumiller [Tue, 2 Oct 2018 09:13:38 +0000 (11:13 +0200)]
add feature flags using apparmor profile generation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoconfig: whitelist new apparmor related config keys
Wolfgang Bumiller [Tue, 2 Oct 2018 09:13:37 +0000 (11:13 +0200)]
config: whitelist new apparmor related config keys

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoconfigure IPv6AcceptRA in systemd-networkd files
Wolfgang Bumiller [Thu, 13 Sep 2018 07:53:42 +0000 (09:53 +0200)]
configure IPv6AcceptRA in systemd-networkd files

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agod/control: bump pve-common version dependency
Thomas Lamprecht [Thu, 20 Sep 2018 09:02:09 +0000 (11:02 +0200)]
d/control: bump pve-common version dependency

Ensure that the new, unconditional called, PVE::Tools::get_host_arch
is available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agouse new PVE::Tools::get_host_arch
Dietmar Maurer [Thu, 20 Sep 2018 04:59:17 +0000 (06:59 +0200)]
use new PVE::Tools::get_host_arch

5 years agoenable emulation of containers using qemu-user-static
Dietmar Maurer [Fri, 14 Sep 2018 11:27:03 +0000 (13:27 +0200)]
enable emulation of containers using qemu-user-static

You need to install package qemu-user-static which provides
the emulation toolkit.

- emulate arm on x86
- emulate x86 on arm

5 years agodetect_architecture: use ELF machine header to detect ISA
Dietmar Maurer [Wed, 12 Sep 2018 07:27:35 +0000 (09:27 +0200)]
detect_architecture: use ELF machine header to detect ISA

We can now detect arm64 and armhf containers.

5 years agosnapshot_rollback_vm_start: rename $forcemachine param to $data
Dominik Csapak [Fri, 14 Sep 2018 12:08:41 +0000 (14:08 +0200)]
snapshot_rollback_vm_start: rename $forcemachine param to  $data

not used yet in container at all, so this change does not
do anything, besides keeping the interface in sync

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 2.0-27
Thomas Lamprecht [Thu, 13 Sep 2018 09:20:55 +0000 (11:20 +0200)]
bump version to 2.0-27

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agod/control: bump version dependency on pve-storage
Thomas Lamprecht [Thu, 13 Sep 2018 09:20:04 +0000 (11:20 +0200)]
d/control: bump version dependency on pve-storage

needed for the MAX_MOUNT_POINTS bump

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoconfig: add the rest of the missing lock types
Wolfgang Bumiller [Thu, 13 Sep 2018 07:48:13 +0000 (09:48 +0200)]
config: add the rest of the missing lock types

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix #1897: bump MAX_MOUNT_POINTS to 256
Fabian Grünbichler [Wed, 5 Sep 2018 09:37:09 +0000 (11:37 +0200)]
fix #1897: bump MAX_MOUNT_POINTS to 256

and filter list of possible mountpoint names by currently used ones
before iterating instead of in the loop body.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 years agoadd missing 'mounted' as lock type for containers
Dominik Csapak [Fri, 7 Sep 2018 12:58:13 +0000 (14:58 +0200)]
add missing 'mounted' as lock type for containers

since 'move volume' uses such a lock, and
to satisfy the result verification while moving a volume

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agofix #1874: autodev hook: setup devices cgroup
Wolfgang Bumiller [Tue, 21 Aug 2018 07:57:59 +0000 (09:57 +0200)]
fix #1874: autodev hook: setup devices cgroup

Currently the autodev hook only adds device nodes, but in
order for the container to use them we also need to add
entries to the devices cgroup to both the limiting and the
namespaced devices cgroup directory.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix #1885: delete old route when changing gateway
David Limbeck [Tue, 4 Sep 2018 07:24:29 +0000 (09:24 +0200)]
fix #1885: delete old route when changing gateway

if the gateway is not in the subnet of the ip a route is
added. this change enables the deletion of the old route when it
is no longer needed.

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
5 years agod/control: add pve-firewall as build dependency
Thomas Lamprecht [Tue, 4 Sep 2018 06:52:40 +0000 (08:52 +0200)]
d/control: add pve-firewall as build dependency

we use perl modules from pve-firewall and some build steps fail if
isn't installed, e.g., happening on bootstrapping.
pve-firewall includes some modules from us but does so in a way which
can cope with a not-installed pve-container (or qemu-server for that
matter).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version to 2.0-26
Thomas Lamprecht [Thu, 23 Aug 2018 11:57:59 +0000 (13:57 +0200)]
bump version to 2.0-26

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoadd fqdn to /etc/hosts even with no ip
Dominik Csapak [Fri, 29 Jun 2018 08:05:44 +0000 (10:05 +0200)]
add fqdn to /etc/hosts even with no ip

so that if a container is set to dhcp, it still has its
fqdn set correctly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agoadd support for openSUSE Leap 15.0
Thomas Lamprecht [Fri, 3 Aug 2018 12:00:48 +0000 (14:00 +0200)]
add support for openSUSE Leap 15.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agouse SHA-512 for container passwords
Dominik Csapak [Thu, 21 Jun 2018 12:14:28 +0000 (14:14 +0200)]
use SHA-512 for container passwords

this is in glibc since 2.7, centos 6 has 2.12, debian 6 has 2.11,
ubuntu 12.04 has 2.15

so all 'old' templates have a version new enough

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agouse better regex for detecting pre crypt()'d passwords
Dominik Csapak [Thu, 21 Jun 2018 12:14:27 +0000 (14:14 +0200)]
use better regex for detecting pre crypt()'d passwords

this means we also have to adapt some tests

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agouse real days in setup tests
Dominik Csapak [Thu, 21 Jun 2018 12:14:26 +0000 (14:14 +0200)]
use real days in setup tests

so that we can drop the special case in the real code,
use the real time in the tests

for that we replace the special string '@DAYS@' with
the correct value, and reset the file afterwards

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agosnapshot list: define return properties
Dietmar Maurer [Wed, 1 Aug 2018 11:38:24 +0000 (13:38 +0200)]
snapshot list: define return properties

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
5 years agovmstatus: define return propertries
Dietmar Maurer [Wed, 1 Aug 2018 10:14:04 +0000 (12:14 +0200)]
vmstatus: define return propertries

We can use the same properties in vmlist and vmstatus.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
5 years agovmconfig: document return properties
Dietmar Maurer [Wed, 1 Aug 2018 08:42:45 +0000 (10:42 +0200)]
vmconfig: document return properties

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
5 years agovmlist: document return properties
Dietmar Maurer [Tue, 31 Jul 2018 11:51:55 +0000 (13:51 +0200)]
vmlist: document return properties

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
5 years agocleanup: move variable a bit closer to its use...
Wolfgang Bumiller [Tue, 31 Jul 2018 12:12:47 +0000 (14:12 +0200)]
cleanup: move variable a bit closer to its use...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix #1851: check 'replicate' flag for non-volume mountpoints
Dominik Csapak [Tue, 31 Jul 2018 11:44:40 +0000 (13:44 +0200)]
fix #1851: check 'replicate' flag for non-volume mountpoints

setting replicate=0 for a bind mount only makes sense if we
really skip it for replication

also cleanup for them is not necessary, as bind mounts
could not have ever been replicated, thus there should
not be anything to clean up

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 2.0-25
Thomas Lamprecht [Mon, 30 Jul 2018 08:10:14 +0000 (10:10 +0200)]
bump version to 2.0-25

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix #1844: check /etc/.pve-ignore.hosts early
Wolfgang Bumiller [Fri, 20 Jul 2018 06:49:21 +0000 (08:49 +0200)]
fix #1844: check /etc/.pve-ignore.hosts early

Our checks for .pve-ignore.* files happen at write time so
we mostly don't have to think about them within the
functions dealing with them. /etc/hosts is one of the files
we need nowhere except when updating it, and there are some
tools managing it and producing files too large for our
default file_get_contents() size limit, so here we want to
skip early to avoid an error at read time.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agocleanup: remove unused variables
Wolfgang Bumiller [Fri, 20 Jul 2018 06:39:44 +0000 (08:39 +0200)]
cleanup: remove unused variables

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoPVE::LXC::Setup::Fedora: use systemd-networkd
Stoiko Ivanov [Tue, 17 Jul 2018 16:13:45 +0000 (18:13 +0200)]
PVE::LXC::Setup::Fedora: use systemd-networkd

Upstream's templates seem to have switched to systemd-networkd for
fedora > 25. Since then various workarounds have been suggested (starting
the legacy network.service in /etc/rc.local). This patch tries to accomodate
both network-configuration options for the affected and available templates
(25, 26, 27), by configuring both services.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
5 years agoPVE::API2::LXC: import raise_perm_exc
Stoiko Ivanov [Fri, 6 Jul 2018 15:00:45 +0000 (17:00 +0200)]
PVE::API2::LXC: import raise_perm_exc

A bug in the frontend exposed the missing import

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
5 years agodeal with disabled cgroup subsystems
Wolfgang Bumiller [Thu, 21 Jun 2018 08:07:41 +0000 (10:07 +0200)]
deal with disabled cgroup subsystems

When a user disables a cgroup subsystem via eg. a kernel
command line we shouldn't try to generate lxc.cgroup.*
entries for it.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agod/control: update pve-common version dependency
Thomas Lamprecht [Wed, 27 Jun 2018 11:14:36 +0000 (13:14 +0200)]
d/control: update pve-common version dependency

as we use the new param_mapping functionallity from PVE::CLIHandler

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoreplace read_password with param_mapping
Dominik Csapak [Mon, 25 Jun 2018 10:30:11 +0000 (12:30 +0200)]
replace read_password with param_mapping

with this we do not need Term::ReadLine anymore
and we can merge the string_param_file_mapping into the param_mapping

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
5 years agobump version to 2.0-24
Thomas Lamprecht [Wed, 27 Jun 2018 07:22:21 +0000 (09:22 +0200)]
bump version to 2.0-24

5 years agoapi create: allow auto ct start after create finished
Thomas Lamprecht [Wed, 13 Jun 2018 14:34:10 +0000 (16:34 +0200)]
api create: allow auto ct start after create finished

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofollowup: clarify error for CT templates on directory storage
Thomas Lamprecht [Wed, 6 Jun 2018 13:30:42 +0000 (15:30 +0200)]
followup: clarify error for CT templates on directory storage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix #1778: check if storage support templates
Wolfgang Link [Wed, 6 Jun 2018 13:21:45 +0000 (15:21 +0200)]
fix #1778: check if storage support templates

LXC can only create templates on storages which support linked clones.
To prevent this, we will check before we convert to a template if the
storage support this.

5 years agofix #1792: Do not assign vars in conditional statement
Wolfgang Link [Tue, 5 Jun 2018 10:58:47 +0000 (12:58 +0200)]
fix #1792: Do not assign vars in conditional statement

If a variable is defined and assigned in a conditional statement,
it is not defined behavior in Perl.

For more inforamtion about this behavior see
https://perldoc.perl.org/perlsyn.html#Statement-Modifiers

"NOTE: The behaviour of a my, state, or our modified with a statement
modifier conditional or loop construct (for example, my $x if ... )
is undefined.
The value of the my variable may be undef, any previously assigned
value, or possibly anything else.
Don't rely on it. Future versions of perl might do something different
from the version of perl you try it out on. Here be dragons."

5 years agofix #1786: check for shared storage on clone
Wolfgang Bumiller [Tue, 29 May 2018 07:00:32 +0000 (09:00 +0200)]
fix #1786: check for shared storage on clone

Refuse to clone a container to a remote node when using
local storage.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoMark CT as a template after rename volumes.
Wolfgang Link [Wed, 30 May 2018 10:12:52 +0000 (12:12 +0200)]
Mark CT as a template after rename volumes.

If a rename fails, the CT should not mark as a template.

5 years agotemplate create: handle mountpoints besides rootfs
Wolfgang Link [Wed, 30 May 2018 10:12:51 +0000 (12:12 +0200)]
template create: handle mountpoints besides rootfs

we only handled the special rootfs mount so creating a template
from a container with additional mountpoint did not work correctly.
Use foreach_mountpoint to create a base vdisk for all mount points
after checking if the storage supports it

5 years agobump version to 2.0-23
Fabian Grünbichler [Mon, 14 May 2018 09:10:41 +0000 (11:10 +0200)]
bump version to 2.0-23

5 years agoAdd cifs as allowed storage type.
Wolfgang Link [Tue, 8 May 2018 07:27:00 +0000 (09:27 +0200)]
Add cifs as allowed storage type.

5 years agocopy_volume: get the real volume size
Wolfgang Bumiller [Mon, 7 May 2018 12:52:47 +0000 (14:52 +0200)]
copy_volume: get the real volume size

Since we're not supposed to rely on this property being
there or even correct.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofixup: add missing eval around umount
Wolfgang Bumiller [Fri, 4 May 2018 09:12:14 +0000 (11:12 +0200)]
fixup: add missing eval around umount

(as it throws no error)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agofix #1721: unmount containers before trying to mount them
René Jochum [Fri, 4 May 2018 08:04:16 +0000 (10:04 +0200)]
fix #1721: unmount containers before trying to mount them

Signed-off-by: René Jochum <r.jochum@proxmox.com>
6 years agosupport Fedora 28
Thomas Lamprecht [Fri, 27 Apr 2018 09:08:24 +0000 (11:08 +0200)]
support Fedora 28

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoupdate_config: rescan volume size
Fabian Grünbichler [Mon, 23 Apr 2018 10:36:16 +0000 (12:36 +0200)]
update_config: rescan volume size

otherwise the size information gets lost when detaching and reattaching
a mountpoint volume, which is less than ideal since mountpoints without
size information require manual information when restoring.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agobump version to 2.0-22
Dietmar Maurer [Mon, 23 Apr 2018 09:05:20 +0000 (11:05 +0200)]
bump version to 2.0-22

6 years agoadd Ubuntu 18.04 to known versions.
Dietmar Maurer [Mon, 23 Apr 2018 08:59:17 +0000 (10:59 +0200)]
add Ubuntu 18.04 to known versions.

6 years agobump version to 2.0-21
Thomas Lamprecht [Thu, 22 Mar 2018 08:21:40 +0000 (09:21 +0100)]
bump version to 2.0-21

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agocreate: add missing lzo to compression_map
Thomas Lamprecht [Wed, 21 Mar 2018 11:43:21 +0000 (12:43 +0100)]
create: add missing lzo to compression_map

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agorestore: support i/o rate limiting
Wolfgang Bumiller [Wed, 21 Mar 2018 08:57:48 +0000 (09:57 +0100)]
restore: support i/o rate limiting

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agocreate: fix passing of template file descriptor
Wolfgang Bumiller [Wed, 21 Mar 2018 08:57:47 +0000 (09:57 +0100)]
create: fix passing of template file descriptor

This finishes the work started with 07084526aa4a ("create:
open templates as real root"), which opened templates as
real root, but passed it to tar via /proc/*/fd, which does
not actually bypass the check. (Curiously tar did manage to
figure out the file extension from it).

In order to actually extract templates the unprivileged user
cannot access by themselves, we need to pass it to tar via
stdin, however, this means tar cannot auto-detect the
compression (or more accurately, it can and does, but tells
you which option to pass it rather than just extracting
it...)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agoclone: randomize network MAC HW address of clone
Thomas Lamprecht [Tue, 20 Mar 2018 14:28:46 +0000 (15:28 +0100)]
clone: randomize network MAC HW address of clone

adapt code from qemu-servers clone API path and generate a new
randomized network hardware address (MAC) for the new clone to avoid
address collisions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agodisable keyctl in user namespaces
Wolfgang Bumiller [Fri, 16 Mar 2018 08:12:41 +0000 (09:12 +0100)]
disable keyctl in user namespaces

systemd-networkd keeps trying to use keyctl() and if it
refuses to work it is apparently a fatal error, so let's
make it think keyctl() support doesn't actually exist by
letting it always fail with ENOSYS.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
6 years agofix #1704: get container uptime with /proc/<pid>/stat
Dominik Csapak [Mon, 19 Mar 2018 15:30:15 +0000 (16:30 +0100)]
fix #1704: get container uptime with /proc/<pid>/stat

stat on /proc/<pid> is reset when caches are dropped (e.g. from pveperf)
so get the uptime like lxcfs it does, via /proc/<pid>/stat

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agoclone: check storage permissions
Dietmar Maurer [Tue, 20 Mar 2018 11:19:13 +0000 (12:19 +0100)]
clone: check storage permissions

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
6 years agoclone: implement target parameter
Dietmar Maurer [Tue, 20 Mar 2018 11:19:12 +0000 (12:19 +0100)]
clone: implement target parameter

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
6 years agoadd features 'clone', 'copy' to api
Dominik Csapak [Mon, 19 Mar 2018 12:32:31 +0000 (13:32 +0100)]
add features 'clone', 'copy' to api

the gui needs this to detect full/linked clone and snapshots

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agofix spelling
Dietmar Maurer [Fri, 16 Mar 2018 09:54:29 +0000 (10:54 +0100)]
fix spelling