Can't import classes and environments on foreman web gui

Hi,when i tried to import classes and environments on foreman web
gui, it showed "Unable to find directory $confdir/production/modules
in environment production", but I'm sure that the directory exists

> Hi,when i tried to import classes and environments on foreman web
> gui, it showed "Unable to find directory $confdir/production/modules
> in environment production", but I'm sure that the directory exists
>

Can the user who runs foreman access that directory?

Ohad

··· On Fri, Jul 1, 2011 at 11:48 AM, Daniel Ho wrote:


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

>
> yes, I run foreman by root for testing
>

Try running the following command in foreman directory:

export RAILS_ENV=production rake puppet:import:puppet_classes

Ohad

··· On Mon, Jul 4, 2011 at 9:10 AM, Daniel Ho wrote:

On Jul 3, 2:18 pm, Ohad Levy ohadl...@gmail.com wrote:

On Fri, Jul 1, 2011 at 11:48 AM, Daniel Ho hola8...@gmail.com wrote:

Hi,when i tried to import classes and environments on foreman web
gui, it showed “Unable to find directory $confdir/production/modules
in environment production”, but I’m sure that the directory exists

Can the user who runs foreman access that directory?

Ohad


You received this message because you are subscribed to the Google
Groups

“Foreman users” group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

> puppet:/home/puppet/foreman# RAILS_ENV=production rake
> puppet:import:puppet_classes
> (in /home/puppet/foreman)
> Evaluating possible changes to your installation
> Problems were detected during the evaluation phase
>
> Unable to find directory $confdir/devel/modules in environment devel
>
> Please fix these issues and try again
>
> maybe I should provide some settings
> confdir=/etc/puppet
> [devel]
> manifest=$confdir/manifests/site.pp
> modulepath=$confdir/devel/modules
>
> Also ,i set the module_path in Foreman /etc/puppet .
>
ah… I think that foreman does not expand the $confdir var, try putting
there the full path and see if it works.

if it does, please open a ticket :slight_smile:

thanks,
Ohad

··· On Mon, Jul 4, 2011 at 9:32 AM, Daniel Ho wrote:

On Jul 4, 2:16 pm, Ohad Levy ohadl...@gmail.com wrote:

On Mon, Jul 4, 2011 at 9:10 AM, Daniel Ho hola8...@gmail.com wrote:

yes, I run foreman by root for testing

Try running the following command in foreman directory:

export RAILS_ENV=production rake puppet:import:puppet_classes

Ohad

On Jul 3, 2:18 pm, Ohad Levy ohadl...@gmail.com wrote:

On Fri, Jul 1, 2011 at 11:48 AM, Daniel Ho hola8...@gmail.com > wrote:

Hi,when i tried to import classes and environments on foreman web
gui, it showed "Unable to find directory
$confdir/production/modules

in environment production", but I’m sure that the directory exists

Can the user who runs foreman access that directory?

Ohad


You received this message because you are subscribed to the Google
Groups

“Foreman users” group.
To post to this group, send email to
foreman-users@googlegroups.com.

To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

I would also run puppet --genconfig > /tmp/a and see if the values are
sensible. They will probably not be right if you are not root. I have a
workaround that I use for non-root testing and that is to place symlinks in
~/.puppet that point to /etc/puppet/…

··· On 4 July 2011 07:36, Ohad Levy wrote:

On Mon, Jul 4, 2011 at 9:32 AM, Daniel Ho hola8352@gmail.com wrote:

puppet:/home/puppet/foreman# RAILS_ENV=production rake
puppet:import:puppet_classes
(in /home/puppet/foreman)
Evaluating possible changes to your installation
Problems were detected during the evaluation phase

Unable to find directory $confdir/devel/modules in environment devel

Please fix these issues and try again

maybe I should provide some settings
confdir=/etc/puppet
[devel]
manifest=$confdir/manifests/site.pp
modulepath=$confdir/devel/modules

Also ,i set the module_path in Foreman /etc/puppet .

ah… I think that foreman does not expand the $confdir var, try putting
there the full path and see if it works.

if it does, please open a ticket :slight_smile:

thanks,
Ohad

On Jul 4, 2:16 pm, Ohad Levy ohadl...@gmail.com wrote:

On Mon, Jul 4, 2011 at 9:10 AM, Daniel Ho hola8...@gmail.com wrote:

yes, I run foreman by root for testing

Try running the following command in foreman directory:

export RAILS_ENV=production rake puppet:import:puppet_classes

Ohad

On Jul 3, 2:18 pm, Ohad Levy ohadl...@gmail.com wrote:

On Fri, Jul 1, 2011 at 11:48 AM, Daniel Ho hola8...@gmail.com >> wrote:

Hi,when i tried to import classes and environments on foreman
web

gui, it showed "Unable to find directory
$confdir/production/modules

in environment production", but I’m sure that the directory
exists

Can the user who runs foreman access that directory?

Ohad


You received this message because you are subscribed to the Google
Groups

“Foreman users” group.
To post to this group, send email to
foreman-users@googlegroups.com.

To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.