Problem with pveca

rubenfdez

New Member
Sep 2, 2011
10
0
1
This is my problem.

Code:
xxx:~# pveca ---help
Unknown option: -help
USAGE: pveca -l             # show cluster status
       pveca -c             # create new cluster with localhost as master
       pveca -s [-h IP]     # sync cluster configuration from master (or IP)
       pveca -d ID          # delete a node
       pveca -a [-h IP]     # add new node to cluster
       pveca -m             # force local node to become master
       pveca -i             # print node info (CID NAME IP ROLE)
xxx:~# pveca -c
strange key format - not base64 encoded at /usr/share/perl5/PVE/Config.pm line 304, <GEN5> line 1.

This is my logs
Code:
apt-get update
apt-get install vim
vim /etc/apt/sources.list
    deb http://ftp.debian.org/debian lenny main


    # PVE packages provided by proxmox.com
    deb http://download.proxmox.com/debian lenny pve


    # security updates
    deb http://security.debian.org/ lenny/updates main


wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -
apt-get update
apt-get upgrade
aptitude install pve-kernel-2.6.32-4-pve
reboot
uname -a
vim /boot/grub/menu.list
    comentar las lineas para arrancar con el kernel de proxmox


apt-get install pve-headers-2.6.32-4-pve
reboot


ifconfig eth0


aptitude install proxmox-ve-2.6.32 ntp ssh lvm2


The following packages will be REMOVED:
  exim4-daemon-light{a} firmware-linux-free{a} firmware-linux-nonfree{a} 
0 packages upgraded, 117 newly installed, 3 to remove and 0 not upgraded.
Need to get 39.2MB of archives. After unpacking 80.7MB will be used.
The following packages have unmet dependencies:
  exim4-config: Conflicts: postfix but 2.5.5-1.1+lenny1 is to be installed.
  exim4: Depends: exim4-daemon-light but it is not installable or
                  exim4-daemon-heavy but it is not installable or
                  exim4-daemon-custom which is a virtual package.
  openntpd: Conflicts: ntp but 1:4.2.4p4+dfsg-8lenny3 is to be installed.
The following actions will resolve these dependencies:


Remove the following packages:
exim4
exim4-base
exim4-config
openntpd


Leave the following dependencies unresolved:
linux-image-2.6.32-bpo.5-amd64 recommends firmware-linux-free (>= 2.6.32)
Score is 120


Accept this solution? [Y/n/q/?] ?
The following commands are available:
  y: accept the proposed changes
  n: reject the proposed changes and search for another solution
  q: give up and quit the program
  ,: move to the next solution
  .: move to the previous solution
  o: toggle between the contents of the solution and an explanation of the solution
  e: examine the solution in the visual user interface
  x: abort automatic dependency resolution; resolve dependencies by hand instead
  r pkg ver ...: reject the given package versions; don't display any solutions in which they occur.  Enter UNINST instead of a version to reject removing the
                 package.
  
  a pkg ver ...: accept the given package versions; display only solutions in which they occur.  Enter UNINST instead of a version to accept removing the
                 package.
  
  <ACTION> pkg... : adjust the state of the listed packages, where ACTION is one of:
  
  '+' to install packages
  '+M' to install packages and immediately flag them as automatically installed
  '-' to remove packages
  '_' to purge packages
  '=' to place packages on hold
  ':' to keep packages in their current state without placing them on hold
  '&M' to mark packages as automatically installed
  '&m' to mark packages as manually installed
Accept this solution? [Y/n/q/?] y




Setting up ntp (1:4.2.4p4+dfsg-8lenny3) ...


Configuration file `/etc/ntp.conf'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : background this process to examine the situation
 The default action is to keep your current version.
*** ntp.conf (Y/I/N/O/D/Z) [default=N] ? I
 
you will need to un-install both kernel and headers for pve
then un-install

firmware-linux-free
firmware-linux-nonfree

and finally reinstall pve kernel and headers

hope this helps
 
After the install aptitude install pve-kernel-2.6.32-4-pve and reboot.

Before: aptitude remove firmware-linux-free and aptitude remove firmware-linux-nonfree

s15714556:~# uname -a
Linux s15714556 2.6.32-bpo.5-amd64 #1 SMP Thu Oct 21 10:02:18 UTC 2010 x86_64 GNU/Linux
s15714556:~#

because run with the kernel of pve?

if i modify the file /boot/grub/menu.lst, which lines need to change?
 
After the install aptitude install pve-kernel-2.6.32-4-pve and reboot.

Before: aptitude remove firmware-linux-free and aptitude remove firmware-linux-nonfree

s15714556:~# uname -a
Linux s15714556 2.6.32-bpo.5-amd64 #1 SMP Thu Oct 21 10:02:18 UTC 2010 x86_64 GNU/Linux
s15714556:~#

because run with the kernel of pve?

if i modify the file /boot/grub/menu.lst, which lines need to change?
Hi,
two ways:
1. change "default 0" to the right number
or (better):
2. use the right pve-kernel as the first entry (end of the file)

Udo
 
Ok, thanks. the problem solved. But when i write pveca -c for create a cluster :

Code:
xxx:~# pveca -c
strange key format - not base64 encoded at /usr/share/perl5/PVE/Config.pm line 304, <GEN5> line 1.
xxx:~# pveca --help
Unknown option: help
USAGE: pveca -l             # show cluster status
       pveca -c             # create new cluster with localhost as master
       pveca -s [-h IP]     # sync cluster configuration from master (or IP)
       pveca -d ID          # delete a node
       pveca -a [-h IP]     # add new node to cluster
       pveca -m             # force local node to become master
       pveca -i             # print node info (CID NAME IP ROLE)

This is the function.

Code:
sub read_rsapubkey {
    my ($filename, $fh) = @_;


    my $line;


    1 while (defined ($line = <$fh>) && ($line !~ m/^.*ssh-rsa\s/));


    my $rsapubkey = $line;


    $rsapubkey =~ s/^.*ssh-rsa\s+//i;
    $rsapubkey =~ s/\s+root\@\S+\s*$//i;
    $rsapubkey =~ s/\s+$//;


    die "strange key format - not base64 encoded"
        if $rsapubkey !~ m/^[A-Za-z0-9\+\/]+={0,2}$/;


    die "unable to read '$filename'" if !$rsapubkey;


    return $rsapubkey;
}
 
Please create an rsa key for ssh (Seem you use a dsa key?). To remove wrong key use:

# rm -rf /root/.ssh/

Then run pveca again.
 
When i want add a other proxmox to node master..

XXYY:~# pveca -a -h XXX.YYY.ZZZ.XXX
strange key format - not base64 encoded at /usr/share/perl5/PVE/Config.pm line 304, <GEN5> line 1.

i remove /root/.ssh and generate the new a ssh-keygen -t rsa
 
Server with Proxmox Master.

i got to create a "pveca -c"

But now, when i connect with ssh to other server for join a node to the master:

Code:
pveca -a -h IP-ADDRESS-MASTER
pveca -a -h XXX.YYY.ZZZ.XXX
strange key format - not base64 encoded at /usr/share/perl5/PVE/Config.pm line 304, <GEN5> line 1.
 
OK, to make it more clear, my suggestion to fix the bug was to run the following commands

# rm -rf /root/.ssh/
# pveca

Note: exactly those commands in exactly that order
 
xxx:~# rm -rf /root/.ssh/
xxx:~# pveca
strange key format - not base64 encoded at /usr/share/perl5/PVE/Config.pm line 304, <GEN5> line 1.
xxx:~# pveca -a -h xxx.yyy.zzz.xxx
strange key format - not base64 encoded at /usr/share/perl5/PVE/Config.pm line 304, <GEN5> line 1.
xxx:~#
 
xxx:~# rm -rf /root/.ssh/
xxx:~# pveca
strange key format - not base64 encoded at /usr/share/perl5/PVE/Config.pm line 304, <GEN5> line 1.
xxx:~# pveca -a -h xxx.yyy.zzz.xxx
strange key format - not base64 encoded at /usr/share/perl5/PVE/Config.pm line 304, <GEN5> line 1.
xxx:~#

So how does your public key look like?

# cat /root/.ssh/id_rsa.pub
 
xxx:~# cat /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAA2ABIwAAAQEAvwwWMTfjgUKGzOwSKn43oAKz0roJUawjtuyRZOLahBj4bRQqPzBUxI0eBi3CRopU0hYjXqWd5Diuo/AVVq4Ajm1ifMkcUJx7kKi4n7zczhBce3in9beujkiI3OfOpPSe7o+JmuLIHNLxBo9m+44aLol4sijqPF8XXmfUuwBH2krPClUL6Y4G4zLADwHGGPsy7jDMubRZG2riqqLnj//V3NlaAvB60KfdNzgRKQnFXy2kq8sf+qWQsLuMT5SPbCN3M/w0DSWlKvvj3qBbPytKxcml40QRflFQrRTnnjC1IDKHZOGanqwHJ1QKsUzPlN7tqfC39Jcsid41M1vk/r61Qw== root@xxx
xxx:~#
 
xxx:~# cat /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAA2ABIwAAAQEAvwwWMTfjgUKGzOwSKn43oAKz0roJUawjtuyRZOLahBj4bRQqPzBUxI0eBi3CRopU0hYjXqWd5Diuo/AVVq4Ajm1ifMkcUJx7kKi4n7zczhBce3in9beujkiI3OfOpPSe7o+JmuLIHNLxBo9m+44aLol4sijqPF8XXmfUuwBH2krPClUL6Y4G4zLADwHGGPsy7jDMubRZG2riqqLnj//V3NlaAvB60KfdNzgRKQnFXy2kq8sf+qWQsLuMT5SPbCN3M/w0DSWlKvvj3qBbPytKxcml40QRflFQrRTnnjC1IDKHZOGanqwHJ1QKsUzPlN7tqfC39Jcsid41M1vk/r61Qw== root@xxx
xxx:~#

That works here without problems. What is the output of

# pveversion -v
 
This is the server node.

xxx:~# pveversion -v
pve-manager: 1.6-5 (pve-manager/1.6/5261)
running kernel: 2.6.18-4-pve
proxmox-ve-2.6.18: 1.6-8
pve-kernel-2.6.18-2-pve: 2.6.18-5
pve-kernel-2.6.18-4-pve: 2.6.18-8
qemu-server: 1.1-22
pve-firmware: 1.0-9
libpve-storage-perl: 1.0-14
vncterm: 0.9-2
vzctl: 3.0.24-1pve4
vzdump: 1.2-8
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm-2.6.18: 0.9.1-8

The server master.

xxx:~# pveversion -v
pve-manager: 1.8-18 (pve-manager/1.8/6070)
running kernel: 2.6.32-4-pve
proxmox-ve-2.6.32: 1.8-33
pve-kernel-2.6.32-4-pve: 2.6.32-33
qemu-server: 1.1-30
pve-firmware: 1.0-11
libpve-storage-perl: 1.0-17
vncterm: 0.9-2
vzctl: 3.0.28-1pve1
vzdump: 1.2-14
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.14.1-1
ksm-control-daemon: 1.0-6


i think that is the version proxmox