[pve-devel] [PATCH] prevent the use of AI_ADDRCONFIG
perl's IO::Socket::IP passes this if no GetAddrInfoFlags are passed, which is often useful but also causes it to error when explicitly trying to bind to 127.0.0.1 when there are no _other_ IPv4 addresses present. --- src/PVE/Daemon.pm | 1 + src/PVE/Tools.pm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/Daemon.pm b/src/PVE/Daemon.pm index ddbe656..8a90020 100644 --- a/src/PVE/Daemon.pm +++ b/src/PVE/Daemon.pm @@ -807,6 +807,7 @@ sub create_reusable_socket { Listen = SOMAXCONN, Family = $family, Proto = 'tcp', + GetAddrInfoFlags = 0, ReuseAddr = 1) || die unable to create socket - $@\n; diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index 01823c2..1bc9eec 100644 --- a/src/PVE/Tools.pm +++ b/src/PVE/Tools.pm @@ -696,7 +696,8 @@ sub next_unused_port { LocalPort = $p, ReuseAddr = 1, Family= $family, - Proto = 0); + Proto = 0, + GetAddrInfoFlags = 0); if ($sock) { close($sock); -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] Grub problems and ZFS
Hi all, I might have found the cause for the sometimes failing grub install. As I updated the grub packages today I discovered very extended install time for the grub package which was related to the post-install script. The script ran for several minuttes and while running consuming a full core 100%. The cause for this was strictly related to the package os-prober which is used to find additional OS's and when you have attached a big number of iSCSI LUNs for KVM and/or CT storage this means that os-prober will scan all available connected LUNs for additional OS's. Could this be the cause for failing grub install? As a side note os-prober is completely useless on a bare-metal installer and I think installing proxmox on top of Debian should remove this package too? -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: For recreational use only. pgpdmsCQAdBzF.pgp Description: OpenPGP digital signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH 2/2] allow ipv6 addresses in Storage::verify_server
Sorry, forgot to test the style change... sending an updated patch... ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH 0/2] updated storage patches (this time tested ; -) )
verify_server as earlier but with the missing closing paren... (sorry about that again) And additionally the NFS plugin needs to wrap IPv6 addresses in square brackets. (And quote them in the regex otherwise they are treated as character classes.) Also: NFS uses rpcinfo to check whether an NFS server is available... Now guess when this command got IPv6 supprt... And guess which version debian is at... we need 0.2.3, debian is at 0.2.1... (I updated it locally to (successfully) test the NFSPlugin) *sigh* Wolfgang Bumiller (2): allow ipv6 addresses in Storage::verify_server NFSPlugin: deal with ipv6 addresses and fix regexps PVE/Storage/NFSPlugin.pm | 5 - PVE/Storage/Plugin.pm| 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH 2/2] NFSPlugin: deal with ipv6 addresses and fix regexps
NFS needs brackets around ipv6 addresses. Also: nfs_is_mounted needs to quote the variables. This becomes apparent when ipv6 addresses are used as then the address would otherwise be treated as a character class, causing the check to always fail. --- PVE/Storage/NFSPlugin.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/NFSPlugin.pm b/PVE/Storage/NFSPlugin.pm index 79a7730..14aa4ed 100644 --- a/PVE/Storage/NFSPlugin.pm +++ b/PVE/Storage/NFSPlugin.pm @@ -3,6 +3,7 @@ package PVE::Storage::NFSPlugin; use strict; use warnings; use IO::File; +use Net::IP; use File::Path; use PVE::Tools qw(run_command); use PVE::Storage::Plugin; @@ -28,11 +29,12 @@ sub read_proc_mounts { sub nfs_is_mounted { my ($server, $export, $mountpoint, $mountdata) = @_; +$server = [$server] if Net::IP::ip_is_ipv6($server); my $source = $server:$export; $mountdata = read_proc_mounts() if !$mountdata; -if ($mountdata =~ m|^$source/?\s$mountpoint\snfs|m) { +if ($mountdata =~ m|^\Q$source\E/?\s\Q$mountpoint\E\snfs|m) { return $mountpoint; } @@ -42,6 +44,7 @@ sub nfs_is_mounted { sub nfs_mount { my ($server, $export, $mountpoint, $options) = @_; +$server = [$server] if Net::IP::ip_is_ipv6($server); my $source = $server:$export; my $cmd = ['/bin/mount', '-t', 'nfs', $source, $mountpoint]; -- 2.1.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel