{"action":"opened","issue":{"url":"https://api.github.com/repos/sinfomicien/mariadb/issues/128","repository_url":"https://api.github.com/repos/sinfomicien/mariadb","labels_url":"https://api.github.com/repos/sinfomicien/mariadb/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/sinfomicien/mariadb/issues/128/comments","events_url":"https://api.github.com/repos/sinfomicien/mariadb/issues/128/events","html_url":"https://github.com/sinfomicien/mariadb/issues/128","id":195098314,"number":128,"title":"New Datadir + SELinux issue","user":{"login":"Paladin","id":84123,"avatar_url":"https://avatars.githubusercontent.com/u/84123?v=3","gravatar_id":"","url":"https://api.github.com/users/Paladin","html_url":"https://github.com/Paladin","followers_url":"https://api.github.com/users/Paladin/followers","following_url":"https://api.github.com/users/Paladin/following{/other_user}","gists_url":"https://api.github.com/users/Paladin/gists{/gist_id}","starred_url":"https://api.github.com/users/Paladin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Paladin/subscriptions","organizations_url":"https://api.github.com/users/Paladin/orgs","repos_url":"https://api.github.com/users/Paladin/repos","events_url":"https://api.github.com/users/Paladin/events{/privacy}","received_events_url":"https://api.github.com/users/Paladin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-12T22:01:41Z","updated_at":"2016-12-12T22:01:41Z","closed_at":null,"body":"When specifying a different data directory from the default one on a system running SELinux, there's a problem that arises:\r\n\r\nIt's caused by the process for creating the new data dir (essentially by not changing the config but moving the data and then creating a symbolic link). The package installation puts the correct SEL label on the default data directory, but that gets wiped out by the move-and-link operation. The solution is simple, but since the problem happens within the cookbook, there's no way to \"inject\" the solution into the cookbook from outside. The command \"restorecon -v /var/lib/mysql\" has to be issued to restore the established default context to the data directory before starting the db service (not doing so results in an error condition and the build dies).\r\n\r\nPossibly put a restore context command before the restart, with a guard clause only_if selinux is active (or maybe only_ if the command exists)?\r\n\r\nA related issue is caused because the new data directory doesn't have the correct (mysqld_db_t) selinux type label, but that can be worked around by creating the directory and assigning it the correct label before including the mariadb::default recipe. There's no way to insert the restorecon between the creation of the link and restarting the service, so it crashes.\r\n"}}
{"actor":{"display_login":"Paladin"}}