{"action":"created","issue":{"url":"https://api.github.com/repos/redhat-openstack/openstack-puppet-modules/issues/224","labels_url":"https://api.github.com/repos/redhat-openstack/openstack-puppet-modules/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/redhat-openstack/openstack-puppet-modules/issues/224/comments","events_url":"https://api.github.com/repos/redhat-openstack/openstack-puppet-modules/issues/224/events","html_url":"https://github.com/redhat-openstack/openstack-puppet-modules/issues/224","id":55311048,"number":224,"title":"cinder init.pp manifest: wrong variable evaluation","user":{"login":"Razique","id":1027278,"avatar_url":"https://avatars.githubusercontent.com/u/1027278?v=3","gravatar_id":"","url":"https://api.github.com/users/Razique","html_url":"https://github.com/Razique","followers_url":"https://api.github.com/users/Razique/followers","following_url":"https://api.github.com/users/Razique/following{/other_user}","gists_url":"https://api.github.com/users/Razique/gists{/gist_id}","starred_url":"https://api.github.com/users/Razique/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Razique/subscriptions","organizations_url":"https://api.github.com/users/Razique/orgs","repos_url":"https://api.github.com/users/Razique/repos","events_url":"https://api.github.com/users/Razique/events{/privacy}","received_events_url":"https://api.github.com/users/Razique/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-23T17:51:35Z","updated_at":"2015-01-23T17:53:18Z","closed_at":null,"body":"The following evaluation fails:\r\n```\r\n if $rabbit_use_ssl {\r\n    if !$kombu_ssl_ca_certs {\r\n      fail('The kombu_ssl_ca_certs parameter is required when rabbit_use_ssl is set to true')\r\n    }\r\n    if !$kombu_ssl_certfile {\r\n      fail('The kombu_ssl_certfile parameter is required when rabbit_use_ssl is set to true')\r\n    }\r\n    if !$kombu_ssl_keyfile {\r\n      fail('The kombu_ssl_keyfile parameter is required when rabbit_use_ssl is set to true')\r\n    }\r\n  }\r\n```\r\n\r\nBecause $rabbit_use_ssl is defined as \"false\" - which equals to true to this statement. The node fails to deploy, because puppet agent complains about a missing variable, dependant upon this one.\r\n\r\nWe need to update the evaluation, by adding a \"str2bool\" that will convert the string into a real true or false value. Once updated, puppet is able to deploy the node:\r\n```\r\nif str2bool($rabbit_use_ssl) {\r\n    if !$kombu_ssl_ca_certs {\r\n      fail('The kombu_ssl_ca_certs parameter is required when rabbit_use_ssl is set to true')\r\n    }\r\n    if !$kombu_ssl_certfile {\r\n      fail('The kombu_ssl_certfile parameter is required when rabbit_use_ssl is set to true')\r\n    }\r\n    if !$kombu_ssl_keyfile {\r\n      fail('The kombu_ssl_keyfile parameter is required when rabbit_use_ssl is set to true')\r\n    }\r\n  }\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/redhat-openstack/openstack-puppet-modules/issues/comments/71233892","html_url":"https://github.com/redhat-openstack/openstack-puppet-modules/issues/224#issuecomment-71233892","issue_url":"https://api.github.com/repos/redhat-openstack/openstack-puppet-modules/issues/224","id":71233892,"user":{"login":"Razique","id":1027278,"avatar_url":"https://avatars.githubusercontent.com/u/1027278?v=3","gravatar_id":"","url":"https://api.github.com/users/Razique","html_url":"https://github.com/Razique","followers_url":"https://api.github.com/users/Razique/followers","following_url":"https://api.github.com/users/Razique/following{/other_user}","gists_url":"https://api.github.com/users/Razique/gists{/gist_id}","starred_url":"https://api.github.com/users/Razique/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Razique/subscriptions","organizations_url":"https://api.github.com/users/Razique/orgs","repos_url":"https://api.github.com/users/Razique/repos","events_url":"https://api.github.com/users/Razique/events{/privacy}","received_events_url":"https://api.github.com/users/Razique/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T17:53:18Z","updated_at":"2015-01-23T17:53:18Z","body":"I guess, all blocks that evaluate these variable need this str2bool function, in order to really work :)"}}