[pve-devel] [PATCH cluster] pvecm: add: create task log on cluster join
The API join path creates a task log when joining a cluster. Also create such a log in the CLI code path. Changes are mostly indentation only. Signed-off-by: Thomas Lamprecht --- data/PVE/CLI/pvecm.pm | 101 +++--- 1 file changed, 55 insertions(+), 46 deletions(-) diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm index 9b98815..124f9cd 100755 --- a/data/PVE/CLI/pvecm.pm +++ b/data/PVE/CLI/pvecm.pm @@ -110,72 +110,81 @@ __PACKAGE__->register_method ({ PVE::Cluster::assert_joinable($param->{ring0_addr}, $param->{ring1_addr}, $param->{force}); - if (!$param->{use_ssh}) { - print "Please enter superuser (root) password for '$host':\n"; - my $password = PVE::PTY::read_password("Password for root\@$host: "); + my $worker = sub { - delete $param->{use_ssh}; - $param->{password} = $password; + if (!$param->{use_ssh}) { + print "Please enter superuser (root) password for '$host':\n"; + my $password = PVE::PTY::read_password("Password for root\@$host: "); - my $local_cluster_lock = "/var/lock/pvecm.lock"; - PVE::Tools::lock_file($local_cluster_lock, 10, \&PVE::Cluster::join, $param); + delete $param->{use_ssh}; + $param->{password} = $password; - if (my $err = $@) { - if (ref($err) eq 'PVE::APIClient::Exception' && $err->{code} == 501) { - $err = "Remote side is not able to use API for Cluster join!\n" . - "Pass the 'use_ssh' switch or update the remote side.\n"; + my $local_cluster_lock = "/var/lock/pvecm.lock"; + PVE::Tools::lock_file($local_cluster_lock, 10, \&PVE::Cluster::join, $param); + + if (my $err = $@) { + if (ref($err) eq 'PVE::APIClient::Exception' && $err->{code} == 501) { + $err = "Remote side is not able to use API for Cluster join!\n" . + "Pass the 'use_ssh' switch or update the remote side.\n"; + } + die $err; } - die $err; + return; # all OK, the API join endpoint successfully set us up } - return; # all OK, the API join endpoint successfully set us up - } - # allow fallback to old ssh only join if wished or needed + # allow fallback to old ssh only join if wished or needed - PVE::Cluster::setup_sshd_config(); - PVE::Cluster::setup_rootsshconfig(); - PVE::Cluster::setup_ssh_keys(); + PVE::Cluster::setup_sshd_config(); + PVE::Cluster::setup_rootsshconfig(); + PVE::Cluster::setup_ssh_keys(); - # make sure known_hosts is on local filesystem - PVE::Cluster::ssh_unmerge_known_hosts(); + # make sure known_hosts is on local filesystem + PVE::Cluster::ssh_unmerge_known_hosts(); - my $cmd = ['ssh-copy-id', '-i', '/root/.ssh/id_rsa', "root\@$host"]; - run_command($cmd, 'outfunc' => sub {}, 'errfunc' => sub {}, - 'errmsg' => "unable to copy ssh ID"); + my $cmd = ['ssh-copy-id', '-i', '/root/.ssh/id_rsa', "root\@$host"]; + run_command($cmd, 'outfunc' => sub {}, 'errfunc' => sub {}, + 'errmsg' => "unable to copy ssh ID"); - $cmd = ['ssh', $host, '-o', 'BatchMode=yes', - 'pvecm', 'addnode', $nodename, '--force', 1]; + $cmd = ['ssh', $host, '-o', 'BatchMode=yes', + 'pvecm', 'addnode', $nodename, '--force', 1]; - push @$cmd, '--nodeid', $param->{nodeid} if $param->{nodeid}; - push @$cmd, '--votes', $param->{votes} if defined($param->{votes}); - push @$cmd, '--ring0_addr', $param->{ring0_addr} if defined($param->{ring0_addr}); - push @$cmd, '--ring1_addr', $param->{ring1_addr} if defined($param->{ring1_addr}); + push @$cmd, '--nodeid', $param->{nodeid} if $param->{nodeid}; + push @$cmd, '--votes', $param->{votes} if defined($param->{votes}); + push @$cmd, '--ring0_addr', $param->{ring0_addr} if defined($param->{ring0_addr}); + push @$cmd, '--ring1_addr', $param->{ring1_addr} if defined($param->{ring1_addr}); - if (system (@$cmd) != 0) { - my $cmdtxt = join (' ', @$cmd); - die "unable to add node: command failed ($cmdtxt)\n"; - } + if (system (@$cmd) != 0) { + my $cmdtxt = join (' ', @$cmd); + die "unable to add node: command failed ($cmdtxt)\n"; + } + + my $tmpdir = "$libdir/.pvecm_add.tmp.$$"; + mkdir $tmpdir; + + eval { + print "copy corosync auth key\n"; + $cmd = ['rsync', '--rsh=ssh -l root -o BatchMode=yes', '-lpgoq', + "[$host]:$authf
[pve-devel] applied: [PATCH cluster] pvecm: add: create task log on cluster join
___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] Building pve-qemu containing qemu-system-aarch64
Quoting https://forum.proxmox.com/threads/emulating-non-x86-machine-types.35801/#post-199797 Fabian wrote: > Stappers wrote: > > Got a clean build of package pve-qemu-kvm by > > git clone git://git.proxmox.com/git/pve-qemu > > cd pve-qemu > > # satisfy build depends > > make > > > > Now looking for where the non-x86 architectures were disabled. > > > > I couldn't it in debian/patches, the subgitrepostory mirror_qemu looks > > complete to me. > > > > Clues welcome ;-) > > it's in the packaging directly - see debian/rules > (although such questions might be better asked on pve-devel, > where they are not as easily overlooked ;)) Short version of debian/rules from pve-qemu ./configure make make install $DESTDIR rm $DESTDIR/some/files dh_builddeb During `rm $DESTDIR/some/files` are no files like qemu-system-aarch64 deleted. " $ find qemu.tmp/debian/pve-qemu-kvm | grep bin/qemu-system " qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-i386 " qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-x86_64 There I would expect seeing qemu-system-aarch64 What is needed to build pve-qemu containing qemu-system-aarch64? Groeten Geert Stappers -- Leven en laten leven ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] Building pve-qemu containing qemu-system-aarch64
Am 02/19/2018 um 01:07 PM schrieb Geert Stappers: Quoting https://forum.proxmox.com/threads/emulating-non-x86-machine-types.35801/#post-199797 Fabian wrote: Stappers wrote: Got a clean build of package pve-qemu-kvm by git clone git://git.proxmox.com/git/pve-qemu cd pve-qemu # satisfy build depends make Now looking for where the non-x86 architectures were disabled. I couldn't it in debian/patches, the subgitrepostory mirror_qemu looks complete to me. Clues welcome ;-) it's in the packaging directly - see debian/rules (although such questions might be better asked on pve-devel, where they are not as easily overlooked ;)) Short version of debian/rules from pve-qemu ./configure make make install $DESTDIR rm $DESTDIR/some/files dh_builddeb During `rm $DESTDIR/some/files` are no files like qemu-system-aarch64 deleted. " $ find qemu.tmp/debian/pve-qemu-kvm | grep bin/qemu-system " qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-i386 " qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-x86_64 There I would expect seeing qemu-system-aarch64 What is needed to build pve-qemu containing qemu-system-aarch64? We only built the architecture of the current host system: https://git.proxmox.com/?p=pve-qemu.git;a=blob;f=debian/rules;h=9396228865e4478bde22fa43aeefa868a0d11cb3;hb=HEAD#l40 Add your additional wished targets there. cheers, Thomas ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] Building pve-qemu containing qemu-system-aarch64
On Mon, Feb 19, 2018 at 01:20:36PM +0100, Thomas Lamprecht wrote: > Am 02/19/2018 um 01:07 PM schrieb Geert Stappers: > >Fabian wrote: > >>Stappers wrote: > >>>Now looking for where the non-x86 architectures were disabled. > >>>I couldn't it in debian/patches, the subgitrepostory mirror_qemu looks > >>>complete to me. > >>> > >>it's in the packaging directly - see debian/rules > >Short version of debian/rules from pve-qemu > > > > ./configure > > make > > make install $DESTDIR > > rm $DESTDIR/some/files > > dh_builddeb > >During `rm $DESTDIR/some/files` are no files like qemu-system-aarch64 > >deleted. > > > >" $ find qemu.tmp/debian/pve-qemu-kvm | grep bin/qemu-system > >" qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-i386 > >" qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-x86_64 > > > >There I would expect seeing qemu-system-aarch64 > > > > > >What is needed to build pve-qemu containing qemu-system-aarch64? > > > > We only built the architecture of the current host system: > > https://git.proxmox.com/?p=pve-qemu.git;a=blob;f=debian/rules;h=9396228865e4478bde22fa43aeefa868a0d11cb3;hb=HEAD#l40 > > Add your additional wished targets there. How? debian/rules line 40:./configure --with-confsuffix="/kvm" --target-list=$(ARCH)-softmmu \ line 18:ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) Executing `dpkg-architecture -qDEB_HOST_GNU_CPU` gives only 1 architecture. > >" $ find qemu.tmp/debian/pve-qemu-kvm | grep bin/qemu-system > >" qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-i386 > >" qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-x86_64 That are 2 architectures. Line 40 plus line 18 say there should 1 architecture ... With '--target-list=' one will need a seperator between list items. What should the seperator be? ( colon, comma, space, ... ? ) Cheers Geert Stappers ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] Building pve-qemu containing qemu-system-aarch64
On Mon, Feb 19, 2018 at 02:00:54PM +0100, Geert Stappers wrote: > On Mon, Feb 19, 2018 at 01:20:36PM +0100, Thomas Lamprecht wrote: > > > > We only built the architecture of the current host system: > > > > https://git.proxmox.com/?p=pve-qemu.git;a=blob;f=debian/rules;h=9396228865e4478bde22fa43aeefa868a0d11cb3;hb=HEAD#l40 > > > > Add your additional wished targets there. > > How? > > debian/rules > line 40:./configure --with-confsuffix="/kvm" > --target-list=$(ARCH)-softmmu \ > line 18:ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) > > Executing `dpkg-architecture -qDEB_HOST_GNU_CPU` gives only 1 architecture. > > > >" $ find qemu.tmp/debian/pve-qemu-kvm | grep bin/qemu-system > > >" qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-i386 > > >" qemu.tmp/debian/pve-qemu-kvm/usr/bin/qemu-system-x86_64 > That are 2 architectures. > Line 40 plus line 18 say there should 1 architecture ... > > > With '--target-list=' one will need a seperator between list items. > What should the seperator be? ( colon, comma, space, ... ? ) > Found this --target-list=LIST set target list (default: build everything) Cheers Geert Stappers ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] cloudinit for proxmox 5 v3
On Thu, Jul 27, 2017 at 05:06:33PM +0200, Alexandre Derumier wrote: > Now that proxmox 5.0 is launched, maybe can we try to target cloudinit for > 5.1 ? We'd like to move forward with this. I rebased this patch set again (available at https://github.com/Blub/pve-qemu-server cloudinit branch). There are a few final steps before we can merge this: - Since the patch set contains a bunch of fixup-style commits we'd like to squash them to create a more easy-to-read (and easier-to-bisect) history. @Alexandre: Since some of our changes fixup & build upon each other's previous patches I'd propose using a 'Co-developed-by' tag in the commit message for when squashing fixups of one person into another's commit, would that be okay with you? - I'm really not a fan of using qemu-nbd here, particularly because in my latest tests its been shown to require some additional fsync-work (see my latest patch on github inserting a `dd conv=fsync` pipe...). There are two options: Since the images are really tiny, we could create temporary files in /run for now, and convert those, or, since I'm building qemu with a patch for `dd` to accept data from stdin, the only thing missing for that to be usable is to make it not return an error if the input is too short. - The config-drive format has a few issues. For one, I couldn't use it in a VM without forcing its network interface name to match the config drive's (`eth0`) (and then it completely ignored my DNS settings). I wonder if we should switch to the NoCloud variant which seems to allow matching by mac address (as well as driver or name)? ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH qemu] Makefile: git repository is moved
Signed-off-by: Geert Stappers --- Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Actually is this patch about asking s/pve-qemu-kvm/pve-qemu/ diff --git a/Makefile b/Makefile index c760a7f..b0ffd70 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ $(DEB): | submodule mkdir $(BUILDSRC) cp -a $(KVMSRC)/* $(BUILDSRC)/ cp -a debian $(BUILDSRC)/debian - echo "git clone git://git.proxmox.com/git/pve-qemu-kvm.git\\ngit checkout $(GITVERSION)" > $(BUILDSRC)/debian/SOURCE + echo "git clone git://git.proxmox.com/git/pve-qemu.git\\ngit checkout $(GITVERSION)" > $(BUILDSRC)/debian/SOURCE # set package version sed -i 's/^pkgversion="".*/pkgversion="${KVMPACKAGE}_${KVMVER}-${KVMPKGREL}"/' $(BUILDSRC)/configure cd $(BUILDSRC); dpkg-buildpackage -b -rfakeroot -us -uc -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH qemu 2/3] debian/rules: don't disable Flat Device Tree
I don't know why fdt, Flat Device Tree, is disabled, but that disabling blocks building e.g. qemu-system-aarch64. It stops the build and yields this: ERROR: fdt disabled but some requested targets require it. You can turn off fdt only if you also disable all the system emulation targets which need it (by specifying a cut down --target-list). Signed-off-by: Geert Stappers --- debian/rules |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 0836f32..a5d1e55 100755 --- a/debian/rules +++ b/debian/rules @@ -59,7 +59,7 @@ config.status: configure --disable-smartcard --audio-drv-list="alsa" --enable-spice \ --enable-usb-redir --enable-glusterfs --enable-libusb --disable-gtk \ --enable-xfsctl --enable-numa --disable-strip --enable-jemalloc \ - --enable-virtfs --disable-libnfs --disable-fdt \ + --enable-virtfs --disable-libnfs \ --disable-guest-agent --disable-guest-agent-msi build: patch build-stamp -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH qemu 1/3] debian/rules: added placeholder for adding additional targets
Without this "placeholder" is it unclear how to add additional targets. No real change, just preparing for change. Signed-off-by: Geert Stappers --- debian/rules | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 9396228..0836f32 100755 --- a/debian/rules +++ b/debian/rules @@ -17,6 +17,20 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ARCH ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) +TRGTS = +# empty target-list defaults to building all targets +TRGTS +=--target-list=\" +TRGTS +=$(ARCH)-softmmu +# for build host +# next placeholder for additional targets +#TRGTS +=arm-softmmu +#TRGTS +=aarch64-softmmu +#TRGTS +=mips-softmmu +#TRGTS +=mipsel-softmmu +TRGTS +=\" +TRGTLST =$(shell echo $(TRGTS)) +# to get rid of the backslashes + PACKAGE=pve-qemu-kvm destdir := $(CURDIR)/debian/$(PACKAGE) @@ -37,7 +51,7 @@ config.status: configure # Add here commands to configure the package. # guest-agent is only required for guest systems - ./configure --with-confsuffix="/kvm" --target-list=$(ARCH)-softmmu \ + ./configure --with-confsuffix="/kvm" $(TRGTLST) \ --prefix=/usr --datadir=/usr/share \ --docdir=/usr/share/doc/pve-qemu-kvm \ --sysconfdir=/etc --localstatedir=/var --disable-xen --enable-gnutls \ -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH qemu 3/3] debian/rules: build also bin/qemu-system-arm and bin/qemu-system-aarch64
Signed-off-by: Geert Stappers --- debian/rules |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index a5d1e55..e595483 100755 --- a/debian/rules +++ b/debian/rules @@ -23,8 +23,8 @@ TRGTS +=--target-list=\" TRGTS +=$(ARCH)-softmmu # for build host # next placeholder for additional targets -#TRGTS +=arm-softmmu -#TRGTS +=aarch64-softmmu +TRGTS +=arm-softmmu +TRGTS +=aarch64-softmmu #TRGTS +=mips-softmmu #TRGTS +=mipsel-softmmu TRGTS +=\" -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel