brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-441) OpenStack deploy vm fails: get wrong loginUser
Date Tue, 11 Apr 2017 10:25:42 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15964145#comment-15964145
] 

Aled Sage commented on BROOKLYN-441:
------------------------------------

This may or may not be a bug - I think we need a little more info.

Brooklyn will, by default, use jclouds to ssh to the newly provisioned VM using the {{loginUser}}
(in your case "centos"). It will execute some setup commands, which includes creating a new
user which is subsequently used by Brooklyn. The use that it creates is configured using something
like {{user: brooklyn}}. If this isn't configured, it defaults to using the name of the user
that is executing Brooklyn.

I'm guessing that you're running Brooklyn as the user "ubuntu" (I guess that based on your
privateKeyFile path). I therefore speculate that it's created a user "ubuntu" on your new
centos VM!

The fact that the log message is for ssh'ing with {{SshMachineLocation}} (rather than in jclouds
code) makes me believe it has got past the initial login, and is now using newly created user
for subsequent ssh commands. If that is the case, then this is not a bug.

Is your entity starting up ok, other than this log message?

There are many config options to control if/what user is created, and its configuration. For
example, see https://github.com/apache/brooklyn-server/blob/master/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/CreateUserStatements.java

> OpenStack deploy vm fails: get wrong loginUser
> ----------------------------------------------
>
>                 Key: BROOKLYN-441
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-441
>             Project: Brooklyn
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>         Environment: brooklyn v0.10 openstack liberty
>            Reporter: Nie Kun
>
> I am trying to launch a instance on openstack via brooklyn
> My yaml file was like below:
> {quote}
> name: test
> location:
>   jclouds:openstack-mitaka-nova:
>     endpoint: https://10.10.0.10:5000/v2.0
>     identity: XXXXX
>     credential: XXXXXX
> services:
> - type: brooklyn.entity.basic.EmptySoftwareProcess
>   name: test1
>   provisioning.properties:
>     osFamily: CentOS
>     osVersionRegex: 7
>     hardwareId: RegionOne/3
>     imageId: RegionOne/a9eab8c3-8e3c-4e68-8af2-02e9b5915a58
>     loginUser: centos
>     loginUser.privateKeyFile: /home/ubuntu/.ssh/id_rsa
>     templateOptions:
>       networks: ["3f4ca47b-6e04-449b-a44f-7cbc5696084d"]
>       securityGroups: ["default", "SSH"]
>       generateKeyPair: false
>       keyPairName: niekun_openstack_de
> {quote}
> I specify the loginUser: centos in the yaml file
> But from the log file I saw that brooklyn still trying ssh to the instance by using ubuntu
user.
> I don't know why this happened. It seems like the loginUser: centos does't work.
> Below are the brooklyn's log
> {quote}
> 2017-02-21 09:07:44,202 DEBUG o.a.b.l.ssh.SshMachineLocation [brooklyn-execmanager-dNzOCrw1-174]:
SshMachineLocation[SshMachineLocation:yndl:ubuntu@192.168.1.118/192.168.1.118:22(id=yndlps9c9z)]
invalidating all entries in ssh pool cache. Final stats: CacheStats{hitCount=0, missCount=1,
loadSuccessCount=1, loadExceptionCount=0, totalLoadTime=111485, evictionCount=0}
> {quote}
> I think this is a bug



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message