Hi there, I''m running puppetmasterd manually while testing, and I was trying to split my manifest in several parts using import. If I do so whenever I run the puppetmasterd the manifest gets loaded and served correctly: cognos ~ # puppetmasterd -v info: Starting server for Puppet version 0.20.0 info: Parsed manifest in 0.02 seconds info: /var/lib/puppet/files: allowing *.example.org access info: Listening on port 8140 notice: Starting Puppet server version 0.20.0 info: Creating PID file to /var/run/puppet/puppetmasterd.pid info: Found protos.example.org in /etc/puppet/manifests/site.pp notice: Compiled configuration for protos.example.org in 0.01 seconds But if I change any part of the manifest and try to run the client again I obtain the following: notice: Reloading files err: Permission denied - /root in file /etc/puppet/manifests/site.pp at line 14 where line 14 contains the following: import "basic/*.pp" I haven''t tried this running puppet as a service, but I guess this is a bug, isn''t it? Best regards Jose _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
José González Gómez wrote:> Hi there, > > I''m running puppetmasterd manually while testing, and I was trying to > split my manifest in several parts using import. If I do so whenever I > run the puppetmasterd the manifest gets loaded and served correctly: > > cognos ~ # puppetmasterd -v > info: Starting server for Puppet version 0.20.0 > info: Parsed manifest in 0.02 seconds > info: /var/lib/puppet/files: allowing *.example.org access > info: Listening on port 8140 > notice: Starting Puppet server version 0.20.0 > info: Creating PID file to /var/run/puppet/puppetmasterd.pid > info: Found protos.example.org <http://protos.example.org> in > /etc/puppet/manifests/site.pp > notice: Compiled configuration for protos.example.org > <http://protos.example.org> in 0.01 seconds > > But if I change any part of the manifest and try to run the client again > I obtain the following: > > notice: Reloading files > err: Permission denied - /root in file /etc/puppet/manifests/site.pp at > line 14 > > where line 14 contains the following: > > import "basic/*.pp" > > I haven''t tried this running puppet as a service, but I guess this is a > bug, isn''t it?Are you running puppetmasterd from /root? If not, is there something in your configuration that would cause puppetmasterd to look in /root? The daemon runs as the ''puppet'' user, so it probably does not have access to /root. -- Talent hits a target no one else can hit; Genius hits a target no one else can see. -- Arthur Schopenhauer --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
2006/11/2, Luke Kanies <luke@madstop.com>:> > José González Gómez wrote: > > Hi there, > > > > I''m running puppetmasterd manually while testing, and I was trying to > > split my manifest in several parts using import. If I do so whenever I > > run the puppetmasterd the manifest gets loaded and served correctly: > > > > cognos ~ # puppetmasterd -v > > info: Starting server for Puppet version 0.20.0 > > info: Parsed manifest in 0.02 seconds > > info: /var/lib/puppet/files: allowing *.example.org access > > info: Listening on port 8140 > > notice: Starting Puppet server version 0.20.0 > > info: Creating PID file to /var/run/puppet/puppetmasterd.pid > > info: Found protos.example.org <http://protos.example.org> in > > /etc/puppet/manifests/site.pp > > notice: Compiled configuration for protos.example.org > > <http://protos.example.org> in 0.01 seconds > > > > But if I change any part of the manifest and try to run the client again > > I obtain the following: > > > > notice: Reloading files > > err: Permission denied - /root in file /etc/puppet/manifests/site.pp at > > line 14 > > > > where line 14 contains the following: > > > > import "basic/*.pp" > > > > I haven''t tried this running puppet as a service, but I guess this is a > > bug, isn''t it? > > Are you running puppetmasterd from /root? If not, is there something in > your configuration that would cause puppetmasterd to look in /root? > > The daemon runs as the ''puppet'' user, so it probably does not have > access to /root. >Yes, I''m running it from /root, but when it loads the configuration the first time it seems to look in the right place, when reloading it tries to look in /root. Best regards Jose _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
José González Gómez wrote:> Yes, I''m running it from /root, but when it loads the configuration the > first time it seems to look in the right place, when reloading it tries > to look in /root.I''m not really sure why that would be the case, but I''m not going to try very hard to support starting puppetmasterd from a directory in which it has no read access. -- Never try to tell everything you know. It may take too short a time. --Norman Ford --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
2006/11/2, Luke Kanies <luke@madstop.com>:> > José González Gómez wrote: > > Yes, I''m running it from /root, but when it loads the configuration the > > first time it seems to look in the right place, when reloading it tries > > to look in /root. > > I''m not really sure why that would be the case, but I''m not going to try > very hard to support starting puppetmasterd from a directory in which it > has no read access. >I don''t understand... isn''t puppetmasterd supposed to read imported manifests relative to the location of the main manifest? This seems to be the case when starting, but not when reloading. I just wanted to make you notice that it seems to be behaving different in each case. Anyway, I''ll try to test this starting it as a service. I just was starting it manually for testing purposes. Best regards Jose _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
2006/11/2, José González Gómez <jgonzalez.openinput@gmail.com>:> > 2006/11/2, Luke Kanies <luke@madstop.com>: > > > > José González Gómez wrote: > > > Yes, I''m running it from /root, but when it loads the configuration > > the > > > first time it seems to look in the right place, when reloading it > > tries > > > to look in /root. > > > > I''m not really sure why that would be the case, but I''m not going to try > > > > very hard to support starting puppetmasterd from a directory in which it > > has no read access. > > > > I don''t understand... isn''t puppetmasterd supposed to read imported > manifests relative to the location of the main manifest? This seems to be > the case when starting, but not when reloading. I just wanted to make you > notice that it seems to be behaving different in each case. > > Anyway, I''ll try to test this starting it as a service. I just was > starting it manually for testing purposes. >Running it as a service doesn''t show this problem. Best regards Jose _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
José González Gómez wrote:> I don''t understand... isn''t puppetmasterd supposed to read imported > manifests relative to the location of the main manifest? This seems to > be the case when starting, but not when reloading. I just wanted to make > you notice that it seems to be behaving different in each case.When the parser parses files, it cd''s into the file''s directory so that imports work correctly, and then it cd''s back to its previous PWD after the file is parsed. Thus, it needs to be able to cd into the directory it is started in. It could be argued that this is a bug and should be fixed, but it doesn''t seem unreasonable to require that you start the daemon from a directory it has cd access to.> Anyway, I''ll try to test this starting it as a service. I just was > starting it manually for testing purposes.If it doesn''t work manually, it won''t work as a service. -- Love truth, and pardon error. -- Voltaire --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
José González Gómez wrote:> Running it as a service doesn''t show this problem.Ah; that''s probably because the service is starting in a different directory. -- Ninety-eight percent of the adults in this country are decent, hard-working, honest Americans. It''s the other lousy two percent that get all the publicity. But then--we elected them. --Lily Tomlin --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com