Jira (PUP-4959) Custom facts are missing when modules are shared using VirtualBox

2 views
Skip to first unread message

Juha Vainikka (JIRA)

unread,
Jul 30, 2015, 6:48:05 AM7/30/15
to puppe...@googlegroups.com
Juha Vainikka created an issue
 
Puppet / Bug PUP-4959
Custom facts are missing when modules are shared using VirtualBox
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: debug.txt
Created: 2015/07/30 3:47 AM
Priority: Normal Normal
Reporter: Juha Vainikka

With following sample project:

example
├── environments
│   ├── local
│   │   └── environment.conf
│   └── vagrant
│   └── environment.conf
├── manifests
│   └── site.pp
└── modules
└── simplefact
└── lib
└── facter
└── helloworld.rb

$ cat example/environments/local/environment.conf
modulepath = c:/example/modules
manifest = c:/example/manifests/site.pp

$ cat example/environments/vagrant/environment.conf
modulepath = c:/vagrant/example/modules
manifest = c:/vagrant/example/manifests/site.pp

$ cat example/manifests/site.pp
notify {$hello_world: }

$ cat example/modules/simplefact/lib/facter/helloworld.rb
Facter.add("hello_world") do
setcode do
"foo bar"
end
end

Running Puppet 4 (puppet-agent-1.2.2-x64.msi) inside Windows guest gives following output:

puppet apply --environmentpath environments --environment local manifests\site.pp
Notice: Compiled catalog for win2008r2.fi.logica.com in environment local in 0.30 seconds
Notice: foo bar
Notice: /Stage[main]/Main/Notify[foo bar]/message: defined 'message' as 'foo bar'
Notice: Applied catalog in 0.03 seconds

puppet apply --environmentpath environments --environment vagrant manifests\site.pp
Error: Evaluation Error: Missing title. The title expression resulted in undef at C:/example/manifests/site.pp:1:9 on node win2008r2.fi.demobox.com

Both environments work with puppet-3.8.1-x64.msi. Currently this prevents us to move to Puppet 4.
Full debug output for failing run is provided in attachment.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c)
Atlassian logo

Juha Vainikka (JIRA)

unread,
Jul 30, 2015, 6:51:07 AM7/30/15
to puppe...@googlegroups.com
Juha Vainikka updated an issue
Change By: Juha Vainikka
With following sample project:

{noformat}

{noformat}

Running Puppet 4 (puppet-agent-1.2.2-x64.msi) inside Windows guest gives following output:

puppet apply --environmentpath environments --environment local manifests\site.pp
Notice: Compiled catalog for win2008r2.fi.logica.com in environment local in 0.30 seconds
Notice: foo bar
Notice: /Stage[main]/Main/Notify[foo bar]/message: defined 'message' as 'foo bar'
Notice: Applied catalog in 0.03 seconds

puppet apply --environmentpath environments --environment vagrant manifests\site.pp
Error: Evaluation Error: Missing title. The title expression resulted in undef at C:/example/manifests/site.pp:1:9 on node win2008r2.fi.demobox.com

Both environments work with puppet-3.8.1-x64.msi. Currently this prevents us to move to Puppet 4.
Full debug output for failing run is provided in attachment.

Juha Vainikka (JIRA)

unread,
Jul 30, 2015, 8:35:03 AM7/30/15
to puppe...@googlegroups.com

{noformat}
Notice: Compiled catalog for win2008r2.fi.logica.com in environment local in 0.30 seconds
Notice: foo bar
Notice: /Stage[main]/Main/Notify[foo bar]/message: defined 'message' as 'foo bar'
Notice: Applied catalog in 0.03 seconds
{noformat}

puppet apply --environmentpath environments --environment vagrant manifests\site.pp


{noformat}
Error: Evaluation Error: Missing title. The title expression resulted in undef at C:/example/manifests/site.pp:1:9 on node win2008r2.fi.demobox.com
{noformat}

Both environments work with puppet-3.8.1-x64.msi. Currently this prevents us to move to Puppet 4.
Full debug output for failing run is provided in attachment.

Juha Vainikka (JIRA)

unread,
Aug 3, 2015, 5:21:38 AM8/3/15
to puppe...@googlegroups.com
Juha Vainikka updated an issue
Custom facts are missing when modules are shared between machines in VirtualBox
Change By: Juha Vainikka
Summary: Custom facts are missing when modules are shared  using  between machines in  VirtualBox
Both environments work with puppet-3.8.1-x64.msi.  Full debug output for failing run is provided in attachment. Host is Windows 7 and VirtualBox version is 5.0.0 r101573

 Currently this prevents us to move to Puppet 4
.
Full debug output for failing run
 because Vagrant/VirtualBox  is  provided  a critical piece  in  attachment  our acceptance testing process .

Chris Edester (JIRA)

unread,
Aug 28, 2016, 1:46:03 PM8/28/16
to puppe...@googlegroups.com
Chris Edester commented on Bug PUP-4959
 
Re: Custom facts are missing when modules are shared between machines in VirtualBox

I can verify this as well. It is a pretty nasty issue when you are trying to do builds in Vagrant.
I am not sure if this can be fixed in puppet or Vagrant / Virtualbox..
I should also note that this is a windows only issue.

I have resolved this with this gross hack, if anyone else is suffering.

In a shell provisioner before puppet provisioner:

  1. https://tickets.puppetlabs.com/browse/PUP-4959
    Remove-Item C:\\tmp\\vagrant-puppet
    modules -Recurse -ErrorAction SilentlyContinue
    Copy-Item C:\\tmp\\vagrant-puppet\\environments\\vagrant
    modules C:\\tmp
    vagrant-puppet -Recurse

In puppet provisioner:

  1. puppet.module_path = %w(modules)
    puppet.options = ['--modulepath', 'C:\tmp\vagrant-puppet\modules']
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Aug 29, 2016, 6:20:03 AM8/29/16
to puppe...@googlegroups.com

Kenaz Kwa (JIRA)

unread,
Aug 29, 2016, 7:47:18 PM8/29/16
to puppe...@googlegroups.com

John Duarte (JIRA)

unread,
May 17, 2017, 2:48:03 PM5/17/17
to puppe...@googlegroups.com
John Duarte updated an issue
Change By: John Duarte
Labels: triaged
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

John Duarte (JIRA)

unread,
May 17, 2017, 2:48:03 PM5/17/17
to puppe...@googlegroups.com

Moses Mendoza (JIRA)

unread,
May 17, 2017, 6:07:03 PM5/17/17
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
Labels: help_wanted needs_repo triaged windows

Josh Cooper (Jira)

unread,
Mar 5, 2020, 3:20:03 AM3/5/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-4959
 
Re: Custom facts are missing when modules are shared between machines in VirtualBox

The last meaningful update to this ticket was 2016. I'm going to close this, please reopen if it is still an issue with more recent versions of puppet6.

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages