Hi Billy Olsen,
     Thanks for your help.
     I had change to user onos and retry this ,but it still can’t success.
The full  maas_deployer.log is follow:
2015-12-05 16:19:52,900 DEBUG (main) Starting MAAS deployer
2015-12-05 16:19:52,934 DEBUG (deploy_juju_bootstrap) Creating Juju bootstrap 
vm.
2015-12-05 16:19:52,938 DEBUG (execc) Executing: 'virsh -c qemu:///system 
pool-list' stdin=''
2015-12-05 16:19:52,957 DEBUG (_domain_exists) Checking if domain 'bootstrap' 
exists
2015-12-05 16:19:52,958 DEBUG (execc) Executing: 'virsh -c qemu:///system list 
--all' stdin=''
2015-12-05 16:19:52,974 DEBUG (define) Domain 'bootstrap' already exists
2015-12-05 16:19:52,974 INFO (define) Deleting domain 'bootstrap' before define 
since force=True
2015-12-05 16:19:52,974 DEBUG (_undefine_domain) Undefining domain 'bootstrap'
2015-12-05 16:19:52,975 DEBUG (execc) Executing: 'virsh -c qemu:///system 
destroy bootstrap' stdin=''
2015-12-05 16:19:52,989 DEBUG (execc) Executing: 'virsh -c qemu:///system 
undefine bootstrap' stdin=''
2015-12-05 16:19:53,008 DEBUG (_get_disks) Base volume 'bootstrap.img' already 
exists
2015-12-05 16:19:53,008 INFO (_get_disks) Deleting volume 'bootstrap.img' 
before create since force=True
2015-12-05 16:19:53,008 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-delete --pool default bootstrap.img' stdin=''
2015-12-05 16:19:53,023 DEBUG (define) Creating domain 'bootstrap'
2015-12-05 16:19:53,024 DEBUG (execc) Executing: 'virt-install --connect 
qemu:///system --name bootstrap --ram 4096 --vcpus 4 --disk 
size=120,format=qcow2,bus=virtio,io=native,pool=default --network 
bridge=brAdm,model=virtio --network bridge=brData,model=virtio --network 
bridge=brPublic,model=virtio --boot network,hd,menu=off --noautoconsole --vnc 
--print-xml' stdin=''
2015-12-05 16:19:53,026 DEBUG (execc) Executing: 'tee 
/tmp/tmpuOCAhd/bootstrap.xml' stdin='<type 'file'>'
2015-12-05 16:19:53,372 DEBUG (execc) Executing: 'virsh -c qemu:///system 
define --file /tmp/tmpuOCAhd/bootstrap.xml' stdin=''
2015-12-05 16:19:53,389 DEBUG (execc) Executing: 'virsh -c qemu:///system 
dumpxml bootstrap' stdin=''
2015-12-05 16:19:53,406 DEBUG (deploy_maas_node) Creating MAAS virtual machine.
2015-12-05 16:19:53,409 DEBUG (execc) Executing: 'virsh -c qemu:///system 
pool-list' stdin=''
2015-12-05 16:19:53,427 DEBUG (_domain_exists) Checking if domain 
'opnfv-maas-intel' exists
2015-12-05 16:19:53,427 DEBUG (execc) Executing: 'virsh -c qemu:///system list 
--all' stdin=''
2015-12-05 16:19:53,442 DEBUG (create) Domain 'opnfv-maas-intel' already exists
2015-12-05 16:19:53,443 INFO (create) Deleting domain 'opnfv-maas-intel' before 
create since force=True
2015-12-05 16:19:53,443 DEBUG (_undefine_domain) Undefining domain 
'opnfv-maas-intel'
2015-12-05 16:19:53,443 DEBUG (execc) Executing: 'virsh -c qemu:///system 
destroy opnfv-maas-intel' stdin=''
2015-12-05 16:19:53,955 DEBUG (execc) Executing: 'virsh -c qemu:///system 
undefine opnfv-maas-intel' stdin=''
2015-12-05 16:19:53,974 DEBUG (create) Creating domain 'opnfv-maas-intel'
2015-12-05 16:19:53,976 DEBUG (_create_base_volume) Base volume 
'trusty-amd64-base' already exists
2015-12-05 16:19:53,976 INFO (_create_base_volume) Deleting volume 
'trusty-amd64-base' before create since force=True
2015-12-05 16:19:53,976 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-delete --pool default trusty-amd64-base' stdin=''
2015-12-05 16:19:54,342 DEBUG (_create_base_volume) Creating base volume 
'trusty-amd64-base'
2015-12-05 16:19:54,342 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-create-as --pool default trusty-amd64-base 3G' stdin=''
2015-12-05 16:19:54,362 DEBUG (_create_base_volume) Uploading image 
'trusty-server-cloudimg-amd64-disk1.img' to volume
2015-12-05 16:19:54,362 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-upload --pool default --file trusty-server-cloudimg-amd64-disk1.img --vol 
trusty-amd64-base' stdin=''
2015-12-05 16:19:55,513 DEBUG (_create_root_volume) Root volume 
'opnfv-maas-intel-root.img' already exists
2015-12-05 16:19:55,514 INFO (_create_root_volume) Deleting volume 
'opnfv-maas-intel-root.img' before create since force=True
2015-12-05 16:19:55,514 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-delete --pool default opnfv-maas-intel-root.img' stdin=''
2015-12-05 16:19:55,596 DEBUG (_create_root_volume) Cloning 
'opnfv-maas-intel-root.img' from base image 'trusty-amd64-base'
2015-12-05 16:19:55,597 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-clone --pool default trusty-amd64-base opnfv-maas-intel-root.img' stdin=''
2015-12-05 16:19:58,415 DEBUG (_create_root_volume) Resizing volume 
'opnfv-maas-intel-root.img' to 160G
2015-12-05 16:19:58,415 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-resize --pool default opnfv-maas-intel-root.img 160G' stdin=''
2015-12-05 16:19:58,449 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-info --pool default opnfv-maas-intel-root.img' stdin=''
2015-12-05 16:19:58,465 DEBUG (ensure_cloud_image)
Name:           opnfv-maas-intel-root.img
Type:           file
Capacity:       160.00 GiB
Allocation:     3.00 GiB


2015-12-05 16:19:58,465 DEBUG (create_seed_image) Creating cloud-init seed 
image for MAAS...
2015-12-05 16:19:58,467 INFO (create_seed_image) Seed volume 
'opnfv-maas-intel-seed.img' already exists
2015-12-05 16:19:58,467 INFO (create_seed_image) Deleting volume 
'opnfv-maas-intel-seed.img' before create since force=True
2015-12-05 16:19:58,467 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-delete --pool default opnfv-maas-intel-seed.img' stdin=''
2015-12-05 16:19:58,488 DEBUG (execc) Executing: 'ssh-keygen -t rsa -N  -f 
/home/onos/.ssh/id_maas' stdin=''
2015-12-05 16:19:58,611 DEBUG (_generate_user_data_file) Generating 
mime-multipart user data file using: ['write-mime-multipart', 
'--output=/tmp/tmpajt9yL/user-data.txt', '/tmp/tmpajt9yL/cloud-init.cfg', 
'/tmp/tmpajt9yL/config-maas.sh:text/x-shellscript']
2015-12-05 16:19:58,611 DEBUG (execc) Executing: 'write-mime-multipart 
--output=/tmp/tmpajt9yL/user-data.txt /tmp/tmpajt9yL/cloud-init.cfg 
/tmp/tmpajt9yL/config-maas.sh:text/x-shellscript' stdin=''
2015-12-05 16:19:58,658 DEBUG (create_seed_image) Creating local seed file
2015-12-05 16:19:58,658 DEBUG (execc) Executing: 'cloud-localds 
/tmp/tmpajt9yL/opnfv-maas-intel-seed.img /tmp/tmpajt9yL/user-data.txt 
/tmp/tmpajt9yL/meta-data' stdin=''
2015-12-05 16:19:58,678 DEBUG (create_seed_image) Creating volume
2015-12-05 16:19:58,678 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-create-as --pool default --name opnfv-maas-intel-seed.img --capacity 376832 
--format raw' stdin=''
2015-12-05 16:19:58,696 DEBUG (create_seed_image) Uploading seed 
/tmp/tmpajt9yL/opnfv-maas-intel-seed.img to volume...
2015-12-05 16:19:58,696 DEBUG (execc) Executing: 'virsh -c qemu:///system 
vol-upload --pool default --file /tmp/tmpajt9yL/opnfv-maas-intel-seed.img --vol 
opnfv-maas-intel-seed.img' stdin=''
2015-12-05 16:19:58,719 DEBUG (execc) Executing: 'virt-install --connect 
qemu:///system --name opnfv-maas-intel --ram 4096 --vcpus 4 --disk 
vol=default/opnfv-maas-intel-root.img,format=qcow2,bus=virtio,io=native --disk 
vol=default/opnfv-maas-intel-seed.img,format=raw,bus=virtio,io=native --network 
bridge=brAdm,model=virtio --network bridge=brData,model=virtio --network 
bridge=brPublic,model=virtio --noautoconsole --vnc --import' stdin=''
2015-12-05 16:19:59,838 DEBUG (execc) Executing: 'virsh -c qemu:///system 
autostart opnfv-maas-intel' stdin=''
2015-12-05 16:19:59,856 DEBUG (wait_for_maas_installation) Waiting for MAAS vm 
to come up for ssh..
2015-12-05 16:19:59,857 DEBUG (_get_maas_ip_address) Using ip address 
specified: 192.168.212.140
2015-12-05 16:19:59,857 DEBUG (execc) Executing: 'ssh -i 
/home/onos/.ssh/id_maas -o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no [email protected] true' stdin=''
2015-12-05 16:20:09,409 DEBUG (wait_for_vm_ready) MAAS vm started.
2015-12-05 16:20:09,410 DEBUG (wait_for_cloudinit_finished) Logging into maas 
host '192.168.212.140'
2015-12-05 16:20:09,410 DEBUG (execc) Executing: 'ssh -i 
/home/onos/.ssh/id_maas -o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no [email protected] grep "MAAS controller is now 
configured" /var/log/cloud-init-output.log' stdin=''
2015-12-05 16:20:12,675 INFO (wait_for_cloudinit_finished) Waiting for 
cloud-init to complete - this usually takes several minutes
2015-12-05 16:20:12,675 DEBUG (execc) Executing: 'ssh -i 
/home/onos/.ssh/id_maas -o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no [email protected] grep -m 1 "MAAS controller is now 
configured" <(sudo tail -n 1 -F /var/log/cloud-init-output.log)' stdin=''
2015-12-05 16:20:16,466 ERROR (main) MAAS deployment failed.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/maas_deployer/cli.py", line 88, in main
    engine.deploy(target)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/engine.py", line 
62, in deploy
    self.wait_for_maas_installation(maas_config)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/engine.py", line 
214, in wait_for_maas_installation
    self.wait_for_cloudinit_finished(maas_config, maas_ip)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/util.py", line 32, 
in __retry_on_exception
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/engine.py", line 
200, in wait_for_cloudinit_finished
    util.execc(cmd=cmd)
  File "/usr/lib/python2.7/dist-packages/maas_deployer/vmaas/util.py", line 87, 
in execc
    ret = p.communicate(input=_input)
  File "/usr/lib/python2.7/subprocess.py", line 799, in communicate
    return self._communicate(input)
  File "/usr/lib/python2.7/subprocess.py", line 1401, in _communicate
    stdout, stderr = self._communicate_with_poll(input)
  File "/usr/lib/python2.7/subprocess.py", line 1455, in _communicate_with_poll
ready = poller.poll()


Thanks
yuanyou

发件人: Billy Olsen [mailto:[email protected]]
发送时间: 2015年12月5日 13:16
收件人: zhangyuanyou
抄送: [email protected]; Weidong.Shao; [email protected]
主题: Re: Using maas+juju to deploy openstack,I can't run 02-maasdeploy.sh 
successfully.

So what this seems to be indicating is either a) the ssh key isn't properly 
setup as part of the MAAS cloud unit script, b) the private key doesn't match 
the public key installed, c) something else I can't think of at the moment.

Can we get the full maas-deployer logs? That may shed some light on what's 
going on.

Artur, perhaps something else comes to mind? It's almost as if it's not fully 
cleaned up...

Billy

 The maas-deployer should be creating/using the ssh key that's available in 
/root/.ssh/id_maas according to the logs, because it's running as root. I don't 
currently have access to the script for this (02-maasdeploy.sh) so I'm not 100% 
sure of the context you are running this.

If you don't have another maas environment setup on the same host, something 
you can try is to remove the /root/.ssh/id_maas* keys

On Friday, December 4, 2015, zhangyuanyou 
<[email protected]<mailto:[email protected]>> wrote:
Hi  Artur Tyloch,
   I'm working on maas+juju to deploy openstack,now I edit the 02-maasdeploy.sh 
and excute it.
But this line "maas-deployer -c deployment.yaml -d --force" can't pass ,it 
always let me to input the password like this:

2015-12-04 17:45:54,032 DEBUG Executing: 'virt-install --connect qemu:///system 
--name opnfv-maas-intel --ram 4096 --vcpus 4 --disk 
vol=default/opnfv-maas-intel-root.img,format=qcow2,bus=virtio,io=native --disk 
vol=default/opnfv-maas-intel-seed.img,format=raw,bus=virtio,io=native --network 
bridge=brAdm,model=virtio --network bridge=brData,model=virtio --network 
bridge=brPublic,model=virtio --noautoconsole --vnc --import' stdin=''
2015-12-04 17:45:55,145 DEBUG Executing: 'virsh -c qemu:///system autostart 
opnfv-maas-intel' stdin=''
2015-12-04 17:45:55,162 DEBUG Waiting for MAAS vm to come up for ssh..
2015-12-04 17:45:55,163 DEBUG Using ip address specified: 192.168.212.140
2015-12-04 17:45:55,163 DEBUG Executing: 'ssh -i /root/.ssh/id_maas -o 
UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 
[email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');> 
true' stdin=''
[email protected]'s<javascript:_e(%7B%7D,'cvml','[email protected]%5Cx27s');>
 password:

I edited the file deployment.yaml like this:
demo-maas:
    maas:
        # Defines the general setup for the MAAS environment, including the
        # username and password for the host as well as the MAAS server.
        user: root
        password: root

        # Contains the virtual machine parameters for creating the MAAS virtual
        # server. Here you can configure the name of the virsh domain, the
        # parameters for how the network is attached.
        name: opnfv-maas-intel
        interfaces: 
['bridge=brAdm,model=virtio','bridge=brData,model=virtio','bridge=brPublic,model=virtio']
        memory: 4096
        vcpus: 4
        arch: amd64
        pool: default
        disk_size: 160G

        # Apt http proxy setting(s)
        apt_http_proxy:

        apt_sources:
          - ppa:maas/stable
          - ppa:juju/stable

        # Virsh power settings
        # Specifies the uri and keys to use for virsh power control of the
        # juju virtual machine. If the uri is omitted, the value for the
        # --remote is used. If no power settings are desired, then do not
        # supply the virsh block.
        virsh:
            rsa_priv_key: /home/ubuntu/.ssh/id_rsa
            rsa_pub_key: /home/ubuntu/.ssh/id_rsa.pub
#            uri: 
qemu+ssh://[email protected]/system<http://[email protected]/system>

        # Defines the IP Address that the configuration script will use to
        # to access the MAAS controller via SSH.
        ip_address: 192.168.212.140

Could you help me to resolve the question ? Any assistance is greatly 
appreciated.
Thanks.
Yuanyou




--
Billy Olsen
[email protected]<mailto:[email protected]>
Software Engineer
Canonical USA

-- 
Juju mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to