{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/openshift-ansible-contrib/issues/667","repository_url":"https://api.github.com/repos/openshift/openshift-ansible-contrib","labels_url":"https://api.github.com/repos/openshift/openshift-ansible-contrib/issues/667/labels{/name}","comments_url":"https://api.github.com/repos/openshift/openshift-ansible-contrib/issues/667/comments","events_url":"https://api.github.com/repos/openshift/openshift-ansible-contrib/issues/667/events","html_url":"https://github.com/openshift/openshift-ansible-contrib/issues/667","id":251399966,"number":667,"title":"ca.serial.txt missing kills the install with 3.6","user":{"login":"ikke-t","id":1146409,"avatar_url":"https://avatars0.githubusercontent.com/u/1146409?v=4","gravatar_id":"","url":"https://api.github.com/users/ikke-t","html_url":"https://github.com/ikke-t","followers_url":"https://api.github.com/users/ikke-t/followers","following_url":"https://api.github.com/users/ikke-t/following{/other_user}","gists_url":"https://api.github.com/users/ikke-t/gists{/gist_id}","starred_url":"https://api.github.com/users/ikke-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikke-t/subscriptions","organizations_url":"https://api.github.com/users/ikke-t/orgs","repos_url":"https://api.github.com/users/ikke-t/repos","events_url":"https://api.github.com/users/ikke-t/events{/privacy}","received_events_url":"https://api.github.com/users/ikke-t/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-08-19T04:32:41Z","updated_at":"2017-09-28T07:18:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"# BUG REQUEST INFO:\r\n\r\n**Environment**:\r\n- **Cloud provider:** AWS\r\n\r\n- **OS (`printf \"$(uname -srm)\\n$(cat /etc/os-release)\\n\"`):**\r\n\r\nAll the machines are in AWS: installer which hosts this repo and installer tools is a micro instance, and it creates the OCP cluster by this repo using rhel 7.4 template.\r\n\r\n```\r\n$ uname -srm; cat /etc/os-release\r\nLinux 3.10.0-693.1.1.el7.x86_64 x86_64\r\nNAME=\"Red Hat Enterprise Linux Server\"\r\nVERSION=\"7.4 (Maipo)\"\r\nID=\"rhel\"\r\nID_LIKE=\"fedora\"\r\nVARIANT=\"Server\"\r\nVARIANT_ID=\"server\"\r\nVERSION_ID=\"7.4\"\r\nPRETTY_NAME=\"Employee SKU\"\r\nANSI_COLOR=\"0;31\"\r\nCPE_NAME=\"cpe:/o:redhat:enterprise_linux:7.4:GA:server\"\r\nHOME_URL=\"https://www.redhat.com/\"\r\nBUG_REPORT_URL=\"https://bugzilla.redhat.com/\"\r\n\r\nREDHAT_BUGZILLA_PRODUCT=\"Red Hat Enterprise Linux 7\"\r\nREDHAT_BUGZILLA_PRODUCT_VERSION=7.4\r\nREDHAT_SUPPORT_PRODUCT=\"Red Hat Enterprise Linux\"\r\nREDHAT_SUPPORT_PRODUCT_VERSION=\"7.4\"\r\n\r\n```\r\n\r\n- **Version of Ansible:** (`ansible --version`):\r\n\r\n> $ rpm -q ansible\r\n> ansible-2.3.1.0-3.el7.noarch\r\n\r\n\r\n- **Version of Jinja:** (`pip freeze | grep -i jinja`)\r\n\r\n> $ pip freeze | grep -i jinja\r\n> Jinja2==2.7.2\r\n\r\n\r\n- **Version of Shade:** (`pip freeze | grep -i shade`)\r\n\r\nno such installed \r\n\r\n**Openstack-ansible-contrib version (commit) (`git rev-parse --short HEAD`):**\r\n\r\n> $ git rev-parse --short HEAD\r\n> 1ce66d0\r\n> \r\n\r\n**Copy of used inventory files and custom variables (please omit your secrets!):**\r\n\r\nnothing extra\r\n\r\n**Command used to invoke ansible**:\r\n\r\n```\r\n./ose-on-aws.py --keypair=$AWS_KEY --rhsm-user=$RHUSER --rhsm-password=$RHPWD \\\r\n  --public-hosted-zone=$DOMAIN --rhsm-pool=$RHPOOL \\\r\n  --deployment-type=openshift-enterprise --region=eu-west-1 \\\r\n  --ami=ami-bb9a6bc2  --app-dns-prefix=apps  \\\r\n  --containerized=true \\\r\n  --github-client-id $GH_CID --github-client-secret $GH_CSEC \\\r\n  --github-organization $GH_ORG --app-node-count 2\r\n```\r\n\r\n\r\n**Output of ansible run**:\r\n\r\n```\r\nTASK [openshift_master_certificates : Create the master server certificate] ****************************\r\nskipping: [ose-master01.xxx] => (item=ose-master01.xxx) \r\nfailed: [ose-master01.xxx -> ose-master01.xxx] (item=ose-master02.xxx) => {\r\n    \"changed\": true, \r\n    \"cmd\": [\r\n        \"/usr/local/bin/oc\", \r\n        \"adm\", \r\n        \"ca\", \r\n        \"create-server-cert\", \r\n        \"--hostnames=172.30.0.1,kubernetes.default,internal-openshift-master.xxx,10.20.xxx,op\r\nenshift.default,openshift-master.xxx,openshift.default.svc,ip-10-20-xxx.eu-west-1.compute.int\r\nernal,kubernetes,openshift.default.svc.cluster.local,kubernetes.default.svc,kubernetes.default.svc.clust\r\ner.local,openshift\", \r\n        \"--cert=/etc/origin/generated-configs/master-ip-10-20xxx.eu-west-1.compute.internal/master.se\r\nrver.crt\", \r\n        \"--key=/etc/origin/generated-configs/master-ip-10-20-xxx.eu-west-1.compute.internal/master.ser\r\nver.key\", \r\n        \"--expire-days=730\", \r\n        \"--signer-cert=/etc/origin/master/ca.crt\", \r\n        \"--signer-key=/etc/origin/master/ca.key\", \r\n        \"--signer-serial=/etc/origin/master/ca.serial.txt\", \r\n        \"--overwrite=false\"\r\n    ], \r\n    \"delta\": \"0:00:00.175529\", \r\n    \"end\": \"2017-08-18 20:03:23.015585\", \r\n    \"failed\": true, \r\n    \"item\": \"ose-master02.xxx\", \r\n    \"rc\": 1, \r\n    \"start\": \"2017-08-18 20:03:22.840056\"\r\n}\r\n\r\nSTDERR:\r\n\r\nerror: --signer-serial, \"/etc/origin/master/ca.serial.txt\" must be a valid file\r\nSee 'oc adm ca create-server-cert -h' for help and examples.\r\n```\r\n\r\n**Anything else do we need to know**:\r\n\r\nI had to run the installer several times, as it stopped to different reasons. E.g. not being able to allocate memory, possibly micro instance is too small for ansible. But however, it got past all those, and ansible here didn't make sure if the ca.serial.txt file exists as it should. If the file didn't get created because of earlier failures, it should still be ensured to exist with some dummy value.\r\n\r\nE. Rich from Red Hat found the spot where this fails, and his comments were:\r\n\r\n> I think you have a bug that you need to file: https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_master_certificates/tasks/main.yml#L48-L72 is the code your erroring on. \r\n> \r\n> However nowhere before this do we check / validate that we have the serial file. Using https://github.com/openshift/openshift-ansible/search?utf8=%E2%9C%93&q=openshift_ca_serial&type= I can't see where we ensure that file is created. To work around this just touch the file, or `echo 1 > file` on the server and re-run it should fix the issue. \r\n> \r\n\r\nI now echoed the 1 into serial file, I'll report back how it succeeded"},"comment":{"url":"https://api.github.com/repos/openshift/openshift-ansible-contrib/issues/comments/332750068","html_url":"https://github.com/openshift/openshift-ansible-contrib/issues/667#issuecomment-332750068","issue_url":"https://api.github.com/repos/openshift/openshift-ansible-contrib/issues/667","id":332750068,"user":{"login":"e-minguez","id":346758,"avatar_url":"https://avatars3.githubusercontent.com/u/346758?v=4","gravatar_id":"","url":"https://api.github.com/users/e-minguez","html_url":"https://github.com/e-minguez","followers_url":"https://api.github.com/users/e-minguez/followers","following_url":"https://api.github.com/users/e-minguez/following{/other_user}","gists_url":"https://api.github.com/users/e-minguez/gists{/gist_id}","starred_url":"https://api.github.com/users/e-minguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e-minguez/subscriptions","organizations_url":"https://api.github.com/users/e-minguez/orgs","repos_url":"https://api.github.com/users/e-minguez/repos","events_url":"https://api.github.com/users/e-minguez/events{/privacy}","received_events_url":"https://api.github.com/users/e-minguez/received_events","type":"User","site_admin":false},"created_at":"2017-09-28T07:18:28Z","updated_at":"2017-09-28T07:18:28Z","author_association":"COLLABORATOR","body":"Azure ref. arch. contains a workaround in the post installation steps ([just copying ca.serial.txt from the first master to the masters](https://github.com/openshift/openshift-ansible-contrib/blob/master/reference-architecture/azure-ansible/3.6/bastion.sh#L727-L728))"}}
{"actor":{"display_login":"e-minguez"}}