rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 656 forks source link

I continuously being asked of the password #1217

Open ghost opened 8 years ago

ghost commented 8 years ago

_RancherOS Version: 0.6.0 _

Where are you running RancherOS? OpenStack Mirantis

I have tried:

1) adding ssh keys from Customization Script

and using

2) OpenStack key-pair functionalitiy

I continuously being asked of the password.

Thanks Sotiris

chinaares commented 8 years ago

I have met the same problem! And in the same environment,V0.5.0 works fine, V0.6.0 can't work!

deniseschannon commented 8 years ago

@codergr @chinaares Just to double check, you are trying to log in using the rancher user, correct?

ghost commented 8 years ago

Yup correct.

chinaares commented 8 years ago

@deniseschannon Yes, I log in using rancher!

RancherOS Version: (0.6 and 0.5) 0.5 and 0.6 Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.) openstack mitaka

I create a vm with rancheros-openstack.img with version v0.5 and v0.6 on the same envirment. $ nova boot --flavor m1.small \ --image rancheros-0.5.0 \ --key-name rancheros1 \ rancheros1 $ nova boot --flavor m1.small \ --image rancheros-0.6.0 \ --key-name rancheros2 \ rancheros2

$ nova add-floating-ip rancheros1 192.161.1.55 $ nova add-floating-ip rancheros2 192.161.1.56

but ssh into the vm is different: ssh -i /rancheros1.pem rancher@192.161.1.55 (Success) [rancher@rancher-host1 ~]$

ssh -i /rancheros2.pem rancher@192.161.1.56 (Failed) rancher@192.161.17.56's password:rancher Permission denied, please try again. rancher@192.161.17.56's password:rancher Permission denied, please try again. rancher@192.161.17.56's password:rancher Permission denied (publickey,password,keyboard-interactive).

(I found the password of rancher is 'rancher' on v0.5,but '' on v0.6.)

Any help is appreciated!

Add a little: I through openstack console found out a fact:key-name rancheros2 not placed into the vm,and the vm generate a new keypair。

I don‘t know what happend!

joshwget commented 8 years ago

We're not using Mirantis, but we haven't been able to recreate this issue in our OpenStack setup. Can you check to see if /var/lib/rancher/conf/metadata exists when using OpenStack key-pair functionality? When you tried adding SSH keys through a customization script, what did your cloud-config look like?

chinaares commented 8 years ago

@joshwget I had checkd them,the fact is: on rancheros-0.5.0 instance: $ sudo cat /var/lib/rancher/conf/metadata PublicIPv4: [] PublicIPv6: [] PrivateIPv4: [] PrivateIPv6: [] Hostname: rancheros1.novalocal SSHPublicKeys: rancheros1: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQ5w8rSX273xlK5lBoIveRClrTRbrK45xgS/Kj0vrkaVxqKoJroUFlT7jap74VXjBD7klwBHMjZuJYWJqUbiEyS5fDhJ0XpNGWVWt1GOBZYhXX3UFHdtthl/FUBx16et9z55Y+alLRK9pSHLZ56EKtiq8uAqT7WOc8yqy6FPLDhBRaw5T3XGCk4jutqgcTWNLTw1wNeEWc2xZ7Or+xMxIvow2gK6rHrler8U7YkOFErZxlCMQoWwHb4KvWGiJpAZyAW+fj/4XMeVPY8Tn1UE+kkmE9Smdr4+acK9ezJ5V0yzvtKslkGew+PTw+Z5TyqtU+7a7R74d58wVOPaR0BXYZ Generated-by-Nova NetworkConfig: null

on rancheros-0.6.0 instance: $ sudo cat /var/lib/rancher/conf/metadata cat: can't open '/var/lib/rancher/conf/metadata': No such file or directory

chinaares commented 8 years ago

Anyone give some help?

jliu70 commented 8 years ago

Was hoping that v0.6.1 would have addressed this, but it doesn't look like it.

Removing the rancher password has basically locked us out of the openstack VM.

As a workaround, I've been spinning up v0.5.0 and then upgrading.....

k3nny0ne commented 8 years ago

Same here, Mirantis OpenStack Kilo, RancherOS 0.6.1. Some errors found on instance console on boot: rancher-os-0-6-1-kilo

/dev/vdb is configuration drive

k3nny0ne commented 8 years ago

Seems kernel/fs/fat/vfat.ko, kernel/fs/fat/fat.ko, kernel/fs/fat/vfat.ko and kernel/fs/nls/nls_cp437.ko are missing in 4.4.19-rancher kernel

gumyn commented 7 years ago

+1

Shuliyey commented 7 years ago

you need to enable configure drive, if you are running in openstack

Quote: When launching an instance using the image, you must enable Advanced Options -> Configuration Drive and in order to use a cloud-config file.

https://docs.rancher.com/os/running-rancheros/cloud/openstack/

SvenDowideit commented 7 years ago

There is a fix going into v0.8.1 that will fix the iso based config drive for openstack (we broken it in some changes that went into v0.8.0)

Shuliyey commented 7 years ago

@SvenDowideit sorry i might have misunderstood the problem.

I just tested the v0.8.0 rancheros-openstack image (https://releases.rancher.com/os/v0.8.0/rancheros-openstack.img) about 2-3 hours ago. It worked fine when i followed the Configuration Drive guide https://docs.rancher.com/os/running-rancheros/cloud/openstack/

Do you mean the next version v0.8.1 will work even without turning on the Configuration Drive option for openstack?

SvenDowideit commented 7 years ago

interesting! - see #1614 for the issue report - I was under the impression that the config drive needed to be ISO or VFAT - and both those were broken (in my testing too)

joehumphries commented 7 years ago

To Confirm, I cannot get it working with 0.8 in Openstack, even with the box checked it does not take the correctly.

ghost commented 7 years ago

same problem with 0.9 - in #1643 there is a milestone 0.10 for this problem. any chance to fix install on openstack before 0.10 ?

ghost commented 7 years ago

ok - i have installed 0.9.1 on OpenStack with some dirty hacks ;-)

  1. upload rancher-0.5

  2. create instanse with extended configuration with cloud-config (here an example https://gist.github.com/qrpike/cfd5245d4459a2d6efd8)

  3. login in ssh and...

  4. sudo ros os upgrade 4.1 reboot

  5. remove from known_hosts my rancher host

  6. login in ssh and sudo ros console switch ubuntu 6.1 reboot

  7. remove from known_hosts my rancher host

  8. login in ssh and

    sudo ros config set rancher.docker.tls true
    sudo ros tls gen --server -H localhost -H <myhostnames>
    sudo system-docker restart docker

and now i have 0.9.1 installed on OpenStack

image

SvenDowideit commented 7 years ago

@allustin nice one - that's exactly the same kind of hack I use when I am working with a build where installation is a a problem. The fix I made was to get the config-2 iso to be used as metadata - I guess there's something more that openstack is doing - which we'll need to work through :(

gstorme commented 7 years ago

I'm able to deploy a RancherOS v1.0.1 instance on Openstack with a keypair, which is added to the rancher user authorized_keys, allowing me to logon.