{"action":"closed","issue":{"url":"https://api.github.com/repos/Icinga/puppet-icinga2/issues/295","repository_url":"https://api.github.com/repos/Icinga/puppet-icinga2","labels_url":"https://api.github.com/repos/Icinga/puppet-icinga2/issues/295/labels{/name}","comments_url":"https://api.github.com/repos/Icinga/puppet-icinga2/issues/295/comments","events_url":"https://api.github.com/repos/Icinga/puppet-icinga2/issues/295/events","html_url":"https://github.com/Icinga/puppet-icinga2/issues/295","id":226575234,"number":295,"title":"idomysql fails setting the password","user":{"login":"hboetes","id":2285225,"avatar_url":"https://avatars2.githubusercontent.com/u/2285225?v=3","gravatar_id":"","url":"https://api.github.com/users/hboetes","html_url":"https://github.com/hboetes","followers_url":"https://api.github.com/users/hboetes/followers","following_url":"https://api.github.com/users/hboetes/following{/other_user}","gists_url":"https://api.github.com/users/hboetes/gists{/gist_id}","starred_url":"https://api.github.com/users/hboetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hboetes/subscriptions","organizations_url":"https://api.github.com/users/hboetes/orgs","repos_url":"https://api.github.com/users/hboetes/repos","events_url":"https://api.github.com/users/hboetes/events{/privacy}","received_events_url":"https://api.github.com/users/hboetes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-05-05T13:35:45Z","updated_at":"2017-05-05T14:26:17Z","closed_at":"2017-05-05T14:26:17Z","body":"Evironment: puppet-4.10.0, all relevant modules come from git, OS: ubuntu-16.04.02\r\n\r\nI have this code, or rather a part of the whole code, but this is the relevant part for this bug:\r\n\r\n```\r\n  $ic2db     = 'icinga2'                                                                                                                                                                       \r\n  $ic2dbuser = 'icinga2'                                                                                                                                                                       \r\n  $ic2dbpass = 'secret1'                                                                                                                                                                       \r\n   class{ '::icinga2::feature::idomysql':                                                                                                                                                       \r\n    database      => $ic2db,                                                                                                                                                                   \r\n    user          => $ic2dbuser,                                                                                                                                                               \r\n    password      => $ic2dbpass,                                                                                                                                                               \r\n    import_schema => true,                                                                                                                                                                     \r\n    require       => Mysql::Db[$ic2db],                                                                                                                                                        \r\n  }                                                                                                                                                                                            \r\n```                                                                                                                                                                                               \r\n\r\nI got this debug output:\r\n\r\n```\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: dbconfig-common: writing config to /etc/dbconfig-common/icinga2-ido-mysql.conf\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: creating database backup in /var/cache/dbconfig-common/backups/icinga2-ido-mysql_2.4.1-2ubuntu1.2017-05-05-15.21.53.\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: ERROR 1045 (28000): Access denied for user 'icinga2'@'localhost' (using password: YES).\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: unable to connect to mysql server.\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: error encountered backing up the old database:\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: mysql: [Warning] mysql: Empty value for 'port' specified. Will throw an error in future versions ERROR 1045 (28000): Access denied for user 'icin\r\nga2'@'localhost' (using password: YES)\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: dbconfig-common: icinga2-ido-mysql configure: aborted.\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: dbconfig-common: flushing administrative password\r\nMay  5 15:21:54 icinga02 puppet-agent[21407]: dpkg: error processing package icinga2-ido-mysql (--configure):\r\n```\r\nReading the config file mentioned in the log:\r\n```\r\n# cat /etc/icinga2/features-available/ido-mysql.conf\r\n/**\r\n * The db_ido_mysql library implements IDO functionality\r\n * for MySQL.\r\n */\r\n\r\nlibrary \"db_ido_mysql\"\r\n\r\nobject IdoMysqlConnection \"ido-mysql\" {\r\n  user = \"icinga2\",\r\n  password = \"dG6coWH6uyQL\",\r\n  host = \"localhost\",\r\n  database = \"icinga2\"\r\n}\r\n```\r\n\r\nYes, that's a random password, not the password I set for the dbase.\r\n\r\nI suspect this is caused by `spec/classes/idomysql_spec.rb` not having code to set the password, but I don't really understand the code so I can't tell for sure. Could somebody have a look at it?"}}
{"actor":{"display_login":"bobapple"}}