mesosphere-backup / dcos-gce

Ansible script to install DC/OS on Google Compute Engine
Apache License 2.0
30 stars 18 forks source link

use --scopes is not working in the current version on GCE #24

Closed Rody-greater closed 6 years ago

Rody-greater commented 6 years ago

I've just tried to install this on GCE but getting the following error:

[wait for master instance creation to complete] ***********************************************************************************************************************************FAILED - RETRYING: wait for master instance creation to complete (300 retries left).failed: [localhost] (item={'_ansible_parsed': True, '_ansible_item_result': True, '_ansible_no_log': False, u'ansible_job_id': u'339686342942.2231', 'failed': False, u'started': 1, 'changed': True, 'item': u'master0', u'finished': 0, u'results_file': u'/root/.ansible_async/339686342942.2231', '_ansible_ignore_errors': None}) => {"ansible_job_id": "339686342942.2231", "attempts": 2, "changed": true, "cmd": ["/usr/bin/gcloud", "compute", "--project", "optimum-web-195718", "instances", "create", "master0", "--zone", "us-east1-b", "--machine-type", "n1-standard-2", "--subnet", "default-6f68d4d6fabcb680", "--private-network-ip", "10.142.0.3", "--maintenance-policy", "MIGRATE", "--tags", "master", "--scopes", "default=https://www.googleapis.com/auth/cloud-platform", "--image", "centos-7-v20161027", "--image-project", "centos-cloud", "--boot-disk-size", "10", "--boot-disk-type", "pd-standard", "--boot-disk-device-name", "master0-boot", "--metadata", "hostname=master0"], "delta": "0:00:03.795114", "end": "2018-02-19 19:35:43.643942", "finished": 1, "item": {"ansible_job_id": "339686342942.2231", "changed": true, "failed": false, "finished": 0, "item": "master0", "results_file": "/root/.ansible_async/339686342942.2231", "started": 1}, "msg": "non-zero return code", "rc": 1, "start": "2018-02-19 19:35:39.848828", "stderr": "WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance.\nERROR: (gcloud.compute.instances.create) Invalid value for [--scopes]: Flag format --scopes [ACCOUNT=]SCOPE,[[ACCOUNT=]SCOPE, ...] is removed. Use --scopes [SCOPE,...] --service-account ACCOUNT instead.", "stderr_lines": ["WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance.", "ERROR: (gcloud.compute.instances.create) Invalid value for [--scopes]: Flag format --scopes [ACCOUNT=]SCOPE,[[ACCOUNT=]SCOPE, ...] is removed. Use --scopes [SCOPE,...] --service-account ACCOUNT instead."], "stdout": "", "stdout_lines": []} to retry, use: --limit @/home/rodyhuibers/dcos-gce/install.retry

ajazam commented 6 years ago

Looks like Google has changed the scoping rules. The offending file is create_master_instances.yml and task "Create and launch master". I'll see what happens when I add --no-service-account to the task.

I'll have a look at it when I get home tonight.

ajazam commented 6 years ago

I've just found out there is another project https://docs.mesosphere.com/1.10/installing/oss/cloud/gce/ that shows how to install DCOS on GCE.

If you still want me to fix the ansible install of DCOS on GCE then I'll have a look.

bawdy commented 6 years ago

I am also facing the same problem. Fixing the ansible install would be greatly appreciated!

kalpit-ecosmob commented 6 years ago

I am using below URL:

https://docs.mesosphere.com/1.11/installing/oss/cloud/gce/

When I am going to execute command: ansible-playbook -i hosts install.yml

I am getting below error:

TASK [wait for master instance creation to complete] *** FAILED - RETRYING: TASK: wait for master instance creation to complete (300 retries left). failed: [localhost] (item={'_ansible_parsed': True, '_ansible_no_log': False, u'ansible_job_id': u'406733671907.1610', u'started': 1, '_ansible_item_result': True, 'item': u'master0', u'finished': 0, u'results_file': u'/root/.ansible_async/406733671907.1610'}) => {"ansible_job_id": "406733671907.1610", "attempts": 2, "changed": true, "cmd": ["/usr/bin/gcloud", "compute", "--project", "q-transcode-test-1", "instances", "create", "master0", "--zone", "us-east1-b", "--machine-type", "n1-standard-1", "--subnet", "default", "--private-network-ip", "35.231.40.29", "--maintenance-policy", "MIGRATE", "--tags", "master", "--scopes", "default=https://www.googleapis.com/auth/cloud-platform", "--image", "debian-9-stretch-v20180401", "--image-project", "debian-cloud", "--boot-disk-size", "10", "--boot-disk-type", "pd-standard", "--boot-disk-device-name", "master0-boot", "--metadata", "hostname=master0"], "delta": "0:00:01.647977", "end": "2018-04-24 12:29:41.794781", "failed": true, "finished": 1, "item": {"ansible_job_id": "406733671907.1610", "finished": 0, "item": "master0", "results_file": "/root/.ansible_async/406733671907.1610", "started": 1}, "rc": 1, "start": "2018-04-24 12:29:40.146804", "stderr": "WARNING: You have selected a disk size of under [200GB]. This may result in poor I/O performance. For more information, see: https://developers.google.com/compute/docs/disks#performance.\nERROR: (gcloud.compute.instances.create) Invalid value for [--scopes]: Flag format --scopes [ACCOUNT=]SCOPE,[[ACCOUNT=]SCOPE, ...] is removed. Use --scopes [SCOPE,...] --service-account ACCOUNT instead.", "stdout": "", "stdout_lines": [], "warnings": []} to retry, use: --limit @/usr/local/src/dcos-gce/install.retry

PLAY RECAP ***** localhost : ok=11 changed=6 unreachable=0 failed=1

Oghma commented 6 years ago

I proposed a fix in #25

ajazam commented 6 years ago

I've just merged the fix. Thank you