-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tried to implement test config before reload #10
Conversation
…tions to database
…he tables to bareos, because if I use the bareos-dir check there was a problem with the table permissions on postgresql. There fore the sh shell was needed for the bareos user.
@treenerd I see where you are going with this but based on the kinds of changes you are trying to make I need to take some time to review them. Mind if I look at this a little later today and get back to you? Thanks! BR, GitBytes |
@GitBytes |
Hello! I have taken some time to better evaluate your path on these commits. Here is my breakdown:
@sitle @treenerd Please look through my comments when you have time. Sorry for the wall of text in advance. Apparently, I am a detailed reviewer but that makes it fun right?! ;-) BR, GitBytes |
Hello again; Thank you for the fast review.
Nice to work with you |
@GitBytes @sitle I asked a little about the reload/restart topic in the bareos forum. |
@treenerd That is some good information you got from them. I'll have to look that over again and see if I can work that stuff in where appropriate unless you get to it first. I have been swamped this past week even though I would love to work on this project more.. :( Regarding the other post(s) I haven't had time to comment on.. I think the one thing I wanted to explain was about the server.rb bits you asked about. So, the bareos user isn't meant to be logged into normally, in my opinion anyway. By changing the ability of the bareos user in passwd to use /bin/sh, you are opening up that user to be broken into. If you leave it as /bin/false or /bin/nologin you are preventing the use of the bareos user having a shell environment (service account). It should still do all the daemon stuff it needs to properly but wont open up the users shell access, which, if you have root you can gain access to the bareos user with an Just to note, under the security section of the Bareos doc (http://doc.bareos.org/master/html/bareos-manual-main-reference.html#QQ2-1-526) the File Daemon must be run as root, the Storage Daemon is recommended to run as root but is not required, and the director does not have to be run as root. In fact, I think I am running my director as bareos. I mention this to give scope to what files will need access by root and which can be designated non-root (bareos) access, and I do like moving things to 640 because at most we want just root and bareos to have access and others none. I really only post this as informational for my reference too. Also, I do like the autogenerate password bits you discussed, I had the same thought and want to try to implement that utilizing the OpenSSL Cookbook more or less like the other passwords in the cookbook. I think there is a way to avoid the psql problem you mentioned via the pg_hba.conf options out there (md5 versus ident) but that may take some testing to work it out. Like I said I would love to spend more time on things I just haven't had the time this past week overall... I like the idea on this:
I am glad this whole process has introduced you to rubocop, very useful linting tool. I am not sure what else to hammer out here other than what we have discussed. Feel free to make any further changes and we will get things closed up here or we can maybe get a new PR if we really have to but that is up to you. Thanks! BR, GitBytes (Ian) |
Hi back again, |
No worries! Thanks for doing that, I feel much better now! =) |
… tests as bareos user
So now also the check works with the socket postgresql connection. and thats default db configuration again. should be easier for you to test because of less changes. |
@sitle |
…ng database cookbook
…database scripts needs to read the bareos-dir configuration
…tu. Debian I had to converge twice, otherwise it can't execute the bareos-dir check, don't know why, perhaps anyone has an idea.
So now I rolled back the changes in the database recipe, you are totaly right to get rid of the database cookbook. I changed the role a bit, otherwise the database scripts couldn't read the bareos-dir.conf because it wouldn't exist. I also changed the check a bit, because there where issues in ubuntu with 'su - bareos ...' . And I don't know why but I had to converge the debian server twice to get it run. Cya |
@treenerd I'm not sure without looking over the kitchen output really from the first run. I am not sure of a concise way to post that output in this thread.. In theory I should be able to look back and see which bit failed on initial startup. I am suspecting the restarting of the director though for some reason perhaps... Let me know if you can not find anything, I will try to validate this case at my site and see what I can find as well. |
@@ -11,6 +11,7 @@ | |||
supports 'ubuntu', '>= 12.04' | |||
|
|||
depends 'apt' | |||
depends 'database' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@treenerd We should be able to kill this line now I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes sure, simply forgot to put it out, thank you for the reminder.
…server-ubuntu-14, server-debian-78, server-centos66
Just for information; I got the issues with CentOS7. There was an bug in vagrant 1.6.5. Which made problems with CentOS7. And the second thing is, even the bareos-director in CentOS7 only supports restart action. |
Tried to implement test config before reload
Hi togeather again;
I tried to implement test the configuration before chef is restarts/reloads anything.
I recognized that there was a problem with configuration testing, cause of "wrong" table permissions in the postgresql database. (Not sure if this was no problem with peer authentication)
Take a look on that changes, and tell me what you thinking about them.
Kitchen tests with Ubuntu14, Debian78, CentOS66 worked; There are some issues with CentOS7 cause of undefined addresses, I'll try to solve that as soon as I can.