{"action":"created","issue":{"url":"https://api.github.com/repos/hacken-in/website/issues/571","labels_url":"https://api.github.com/repos/hacken-in/website/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/hacken-in/website/issues/571/comments","events_url":"https://api.github.com/repos/hacken-in/website/issues/571/events","html_url":"https://github.com/hacken-in/website/pull/571","id":66417017,"number":571,"title":"regeln anlegen funktioniert nicht, fixes #360","user":{"login":"bitboxer","id":56195,"avatar_url":"https://avatars.githubusercontent.com/u/56195?v=3","gravatar_id":"","url":"https://api.github.com/users/bitboxer","html_url":"https://github.com/bitboxer","followers_url":"https://api.github.com/users/bitboxer/followers","following_url":"https://api.github.com/users/bitboxer/following{/other_user}","gists_url":"https://api.github.com/users/bitboxer/gists{/gist_id}","starred_url":"https://api.github.com/users/bitboxer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitboxer/subscriptions","organizations_url":"https://api.github.com/users/bitboxer/orgs","repos_url":"https://api.github.com/users/bitboxer/repos","events_url":"https://api.github.com/users/bitboxer/events{/privacy}","received_events_url":"https://api.github.com/users/bitboxer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hacken-in/website/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-05T08:35:34Z","updated_at":"2015-04-15T14:03:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hacken-in/website/pulls/571","html_url":"https://github.com/hacken-in/website/pull/571","diff_url":"https://github.com/hacken-in/website/pull/571.diff","patch_url":"https://github.com/hacken-in/website/pull/571.patch"},"body":"@moonglum @bascht would you please check if this is now working correct for you?\r\n\r\nThanks for @bascht to pinpointing the exact problem."},"comment":{"url":"https://api.github.com/repos/hacken-in/website/issues/comments/93413402","html_url":"https://github.com/hacken-in/website/pull/571#issuecomment-93413402","issue_url":"https://api.github.com/repos/hacken-in/website/issues/571","id":93413402,"user":{"login":"bascht","id":51264,"avatar_url":"https://avatars.githubusercontent.com/u/51264?v=3","gravatar_id":"","url":"https://api.github.com/users/bascht","html_url":"https://github.com/bascht","followers_url":"https://api.github.com/users/bascht/followers","following_url":"https://api.github.com/users/bascht/following{/other_user}","gists_url":"https://api.github.com/users/bascht/gists{/gist_id}","starred_url":"https://api.github.com/users/bascht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bascht/subscriptions","organizations_url":"https://api.github.com/users/bascht/orgs","repos_url":"https://api.github.com/users/bascht/repos","events_url":"https://api.github.com/users/bascht/events{/privacy}","received_events_url":"https://api.github.com/users/bascht/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T14:03:18Z","updated_at":"2015-04-15T14:03:18Z","body":"Alright. Didn't have time to check it until now. This isn't exactly a Vagrant / Puppet issue. It's plain ol' PostgreSQL. There is no such thing as a database `root` user, but you can switch users, using the system `root` user (see example). I think you mixed up the `postgresql` unix user / database user. (The unix user has no password set).\r\n\r\n### Switching users\r\n```sql\r\nvagrant@hacken:/opt/hacken.in$ sudo su - postgres\r\npostgres@hacken:~$ psql\r\npsql (9.3.6)\r\nType \"help\" for help.\r\n\r\npostgres=# SELECT VERSION();\r\n                                                  version                                                   \r\n------------------------------------------------------------------------------------------------------------\r\n PostgreSQL 9.3.6 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit\r\n(1 row)\r\n```\r\n\r\n### Using privileges\r\n\r\nAll databases inside of the VM are created by the user `postgres` - so that's close to using root with mysql. :) On the other side you shouldn't run into problems then. Check your `config/databases.yml`. We could still run into problems if you're creating databases from one of the base templates. I'd suggest we create a different template (with correct encoding) to use with the hacken.in database - just to be sure. Using a template it would look like this.\r\n\r\n#### drop / create\r\n```yaml\r\ndevelopment:\r\n  adapter: postgresql\r\n  database: hcking\r\n  username: postgres\r\n  host: localhost\r\n  password: password\r\n  template: hcking_template\r\n\r\n# Warning: The database defined as \"test\" will be erased and\r\n# re-generated from your development database when you run \"rake\".\r\n# Do not set this db to the same as development or production.\r\ntest:\r\n  adapter: postgresql\r\n  database: hcking_test\r\n  username: postgres\r\n  host: localhost\r\n  password: password\r\n  template: hcking_template\r\n```\r\n```shell\r\nvagrant@hacken:/opt/hacken.in$ sudo su postgres -c \"psql -c '\\l'\" \r\n                                     List of databases\r\n      Name       |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   \r\n-----------------+----------+----------+-------------+-------------+-----------------------\r\n hcking          | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | \r\n hcking_template | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =T/postgres          +\r\n                 |          |          |             |             | postgres=CTc/postgres+\r\n                 |          |          |             |             | user=CTc/postgres\r\n hcking_test     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | \r\n postgres        | postgres | LATIN1   | en_US       | en_US       | \r\n template0       | postgres | LATIN1   | en_US       | en_US       | =c/postgres          +\r\n                 |          |          |             |             | postgres=CTc/postgres\r\n template1       | postgres | LATIN1   | en_US       | en_US       | =c/postgres          +\r\n                 |          |          |             |             | postgres=CTc/postgres\r\nvagrant@hacken:/opt/hacken.in$ bundle exec rake db:drop\r\nvagrant@hacken:/opt/hacken.in$ sudo su postgres -c \"psql -c '\\l'\"                                                                                                                                                                                                                                 \r\n                                     List of databases\r\n      Name       |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   \r\n-----------------+----------+----------+-------------+-------------+-----------------------\r\n hcking_template | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =T/postgres          +\r\n                 |          |          |             |             | postgres=CTc/postgres+\r\n                 |          |          |             |             | user=CTc/postgres\r\n postgres        | postgres | LATIN1   | en_US       | en_US       | \r\n template0       | postgres | LATIN1   | en_US       | en_US       | =c/postgres          +\r\n                 |          |          |             |             | postgres=CTc/postgres\r\n template1       | postgres | LATIN1   | en_US       | en_US       | =c/postgres          +\r\n                 |          |          |             |             | postgres=CTc/postgres\r\n(4 rows)\r\n\r\nvagrant@hacken:/opt/hacken.in$ bundle exec rake db:create\r\nvagrant@hacken:/opt/hacken.in$ sudo su postgres -c \"psql -c '\\l'\" \r\n                                     List of databases\r\n      Name       |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   \r\n-----------------+----------+----------+-------------+-------------+-----------------------\r\n hcking          | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | \r\n hcking_template | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =T/postgres          +\r\n                 |          |          |             |             | postgres=CTc/postgres+\r\n                 |          |          |             |             | user=CTc/postgres\r\n hcking_test     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | \r\n postgres        | postgres | LATIN1   | en_US       | en_US       | \r\n template0       | postgres | LATIN1   | en_US       | en_US       | =c/postgres          +\r\n                 |          |          |             |             | postgres=CTc/postgres\r\n template1       | postgres | LATIN1   | en_US       | en_US       | =c/postgres          +\r\n                 |          |          |             |             | postgres=CTc/postgres\r\n(6 rows)\r\n```\r\n\r\nI'm currently polishing up the commits so I can introduce it into the puppet module, but the permission problem @moonglum saw, is not a bug. I repeat: It's not a bug. :-)"}}