This message was deleted.
# puppet
s
This message was deleted.
y
share the logs maybe
j
Copy code
pdk (INFO): Using Ruby 2.7.7
pdk (INFO): Using Puppet 7.25.0
Building '/home/jgodin/Code/gitrepo/camptocamp/puppet-modules/monitoring' into '/home/jgodin/Code/gitrepo/camptocamp/puppet-modules/monitoring/pkg'
Built '/home/jgodin/Code/gitrepo/camptocamp/puppet-modules/monitoring/pkg/jgodin-monitoring-0.1.0.tar.gz'
rake aborted!
Installation of package jgodin-monitoring-0.1.0.tar.gz failed.
Results:
  0f527046320e: {"stdout"=>"\e[mNotice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...\e[0m\n\e[mNotice: Downloading from <https://forgeapi.puppet.com> ...\e[0m\n", "stderr"=>"\e[1;31mError: Could not install module 'jgodin-monitoring' (v0.1.0)\n  The requested version cannot satisfy all dependencies\n  Use `puppet module install 'jgodin-monitoring' --ignore-dependencies` to install only this module\e[0m\n", "merged_output"=>"\e[mNotice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...\e[0m\n\e[mNotice: Downloading from <https://forgeapi.puppet.com> ...\e[0m\n\e[1;31mError: Could not install module 'jgodin-monitoring' (v0.1.0)\n  The requested version cannot satisfy all dependencies\n  Use `puppet module install 'jgodin-monitoring' --ignore-dependencies` to install only this module\e[0m\n", "exit_code"=>1, "_error"=>{"kind"=>"puppetlabs.tasks/command-error", "issue_code"=>"COMMAND_ERROR", "msg"=>"The command failed with exit code 1", "details"=>{"exit_code"=>1}}}}
/home/jgodin/.pdk/cache/ruby/2.7.0/gems/puppet_litmus-0.36.2/lib/puppet_litmus/rake_helper.rb:424:in `raise_bolt_errors'
/home/jgodin/.pdk/cache/ruby/2.7.0/gems/puppet_litmus-0.36.2/lib/puppet_litmus/rake_helper.rb:325:in `block in install_module'
/home/jgodin/.pdk/cache/ruby/2.7.0/gems/honeycomb-beeline-3.0.0/lib/honeycomb/client.rb:65:in `start_span'
/opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/forwardable-1.3.3/lib/forwardable.rb:240:in `start_span'
/home/jgodin/.pdk/cache/ruby/2.7.0/gems/puppet_litmus-0.36.2/lib/puppet_litmus/rake_helper.rb:302:in `install_module'
/home/jgodin/.pdk/cache/ruby/2.7.0/gems/puppet_litmus-0.36.2/lib/puppet_litmus/rake_tasks.rb:209:in `block (2 levels) in <top (required)>'
/home/jgodin/.pdk/cache/ruby/2.7.0/gems/honeycomb-beeline-3.0.0/lib/honeycomb/integrations/rake.rb:21:in `block in execute'
/home/jgodin/.pdk/cache/ruby/2.7.0/gems/honeycomb-beeline-3.0.0/lib/honeycomb/client.rb:65:in `start_span'
/home/jgodin/.pdk/cache/ruby/2.7.0/gems/honeycomb-beeline-3.0.0/lib/honeycomb/integrations/rake.rb:16:in `execute'
/opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/puppetlabs/pdk/private/ruby/2.7.7/bin/bundle:23:in `load'
/opt/puppetlabs/pdk/private/ruby/2.7.7/bin/bundle:23:in `<main>'
Tasks: TOP => litmus:install_module
(See full trace by running task with --trace)
pdk bundle exec rake 'litmus:install_module'
And the commands :
Copy code
pdk bundle exec rake 'litmus:provision[docker_exp, litmusimage/centos:stream8]'
  pdk bundle exec rake 'litmus:install_agent'
  pdk bundle exec rake 'litmus:install_module'
y
Downloading from https://forgeapi.puppet.com ...\e[0m\n\e[1;31mError: Could not install module ‘jgodin-monitoring’ (v0.1.0)\n The requested version cannot satisfy all dependencies\n
I guess your module is not available on forge yet, right?
j
No, it is not. it is for test purpose, prior to actually push them to prod or something.
it needs to be on the forge for testing ?
y
no, it shouldn’t
but litmus trying to fetch it from there.. so question is how to tell it to not do that
j
Thing is : when i remove all the dependecies in the metadata.json, it actually install the module (but of course, test fails).
As I see here you miss the
provision
module in .fixtures.yml
not sure how critical is it though
j
Added the provision, but nope, still the same error
y
maybe someone from <!subteam^S03FE2T0JM7> can help then.. I guess litmus is under them
d
I've pinged into internal cat channel too 🐈
🙇 1
🙇🏻 1
c
You’ll need provision if you are using docker for your acceptance tests
also re the module, I believe you will need to reference it in your fixtures too
j
"re" ?
c
regarding
sorry!
if it’s in git you can tell fixtures to pull it from there
that all gets done in the “spec_prep” phase
upgraded config files 🙂
c
before you run the commands above
can you try to run pdk bundle exec rake spec_prep?
j
Yes, i did, the
./spec/fixtures/modules/
seems to be populated
c
did it configure the symlink for monitoring as expected?
j
Copy code
drwxrwxr-x jgodin jgodin 4.0 KB Thu Jun 22 14:27:11 2023  apache
drwxrwxr-x jgodin jgodin 4.0 KB Thu Jun 22 14:25:47 2023  concat
drwxrwxr-x jgodin jgodin 4.0 KB Thu Jun 22 14:25:47 2023  facts
lrwxrwxrwx jgodin jgodin  73 B  Thu Jun 22 15:03:19 2023  monitoring ⇒ /home/jgodin/Code/camptocamp/puppet-modules/monitoring
drwxrwxr-x jgodin jgodin 4.0 KB Thu Jun 22 14:25:47 2023  portage
drwxrwxr-x jgodin jgodin 4.0 KB Thu Jun 22 14:25:47 2023  provision
drwxrwxr-x jgodin jgodin 4.0 KB Thu Jun 22 14:25:47 2023  puppet_agent
drwxrwxr-x jgodin jgodin 4.0 KB Thu Jun 22 14:25:47 2023  stdlib
drwxrwxr-x jgodin jgodin 4.0 KB Thu Jun 22 14:25:47 2023  yumrepo_core
c
interesting
I wonder if you need to clean it up and re run spec_prep
I seem to remember a similar issue a while back
j
This is usually not a good sign when computer peoples say this kind of "interesting"
😂 1
c
the symlink is there but not actually working
j
ok , so i rm -rf the
./spec/fixtures/modules/
directory ?
and try spec_prep again /
?
c
let me try that locally first
j
okay .
c
you can run
pdk bundle exec rake spec_clean
then try spec_prep again
j
Done, i can try the whole thing again /
i mean provision>agent>module ?
c
yeah give it a go
I’ve got to get on a plane now so will be away for a while
Hopefully one of my colleagues can jump in
<!subteam^S03FE2T0JM7> ^^ 🙂
j
👋
j
o/ Hey jordan !
j
hello! let me try to catch up here
j
Sure ! i am launching the whole thing again
y
I remember some issue with the symlink while ago too 😄 IIRC it was a conflict of rspec and something else..
j
you shouldn't need to explicitly define the symlink anymore, spec_helper does that for you 🙂
👍🏻 1
j
I tried without , same result,
j
hmmm
i'm going to see if i can replicate this using your metadata and fixtures
thumbsupparrot 1
j
FYI :
Copy code
pdk --version                                                          
2.7.1
🙌 1
Also
Copy code
monitoring 50db098 △ ◒  → ruby --version                                                    
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
monitoring 50db098 △ ◒  → bundle --version                                                      
Bundler version 2.3.10Als
y
you’re using PDK ruby FYI 🙂
pdk bundle exec
j
Copy code
monitoring 50db098 △ ◒  → pdk bundle exec
pdk (INFO): Using Ruby 2.7.7
pdk (INFO): Using Puppet 7.25.0
j
Interesting.. I can install without any issues
j
Okay, i guess the problem is on my side
j
would there be a conflict on versions of modules already installed? Or is this a fresh container
we're happy to help you along the way with the process if it is!
j
i tear_down/provision multiple times
j
ah.. that is really weird then.
y
just have a call with the screen sharing in Slack 😄
j
That would be doable on my side .
j
I have a team meeting shortly, but 4pm my time suits. (1 hour and 20mins from now..)
j
It's 15:41 here. i guess you are 14:41 (UK ?). i will be available in 1h20 from now too.
👍 1
j
nice one 🙂
y
pls share what was the problem after 🙏🏻 I’m curious 😉
j
doh
Copy code
Installing from a release tarballTo install a module from a release tarball, specify the path to the tarball instead of the module name.
If you cannot connect to the Forge, or you are installing modules that have not yet been published to the Forge, use the --ignore-dependencies option and manually install any dependencies.
looks like unreleased modules must be installed that way...
Copy code
puppet module install ~/puppetlabs-apache-0.10.0.tar.gz --ignore-dependencies
d
j
let me get the steps to upload the tarball to the container for you, and you can give that a go
Copy code
pdk build

pdk bundle exec bolt file upload ./pkg/<your_tarball_here> <destination_on_container> --targets docker_nodes --inventoryfile spec/fixtures/litmus_inventory.yaml

pdk bundle exec bolt command run 'puppet module install /path/to/tarball.tar.gz --ignore-dependencies' --targets docker_nodes --inventoryfile spec/fixtures/litmus_inventory.yaml
Once manually installed along with the dependencies you should be able to run your acceptance suite with
pdk bundle exec rake 'litmus:acceptance:parallel'
(i hope) 🤞
j
Uploaded , just test the whole thing ? what about dependencies ?
j
yes so dependencies will need installed manually too
let me point you to the docs where I got that 🙂
^
y
oh.. I thought it should be done automagically (as beaker does)
j
Thought that too.
j
it seems somewhere behind the scenes litmus is trying to find the module on the forge.. unexpected
I too learned something today
y
maybe it’d be nice to sync the module directory with a target by default
j
I mean, i do not mind dependencies to be on the forge, but the module i am developping ...
@Jordan Breen Don't forget your meeting 😉
j
Of course! it makes sense for the module under development to not be released.. I may be missing something
thank you.. I had nearly forgotten 😆
y
it might cause much more confusion for a module which was released once.. you run an acceptance test and litmus do a test of the Forge version instead of your local changes
j
okay, i would agree to actually write an issue, but it seems that litmus is not given that much love 😞
j
this is true.. but we are expecting that too change very soon
👍🏻 1
👍 2
y
pls sync with Voxpupuli guys (I mean @bastelfreak at least) as they got a lot of experience in acceptance testing I believe 🙂
though I like the idea of using Bolt for provisioning!
b
welp what a backlog
j
its surprising behaviour that litmus is looking for the module on the forge when it is already uploading the tarbal
welcome @bastelfreak
y
@bastelfreak I’ve just put more load on you, sorry 😄
b
😄
j
Sorry, it's all my fault ... 😊
j
okay yes so I can confirm now.. I created a new, unreleased module using pdk and ran the commands and can replicate the error. This is definitely not the intended behaviour of litmus, so I'm going to raise a ticket for this.
Thanks for finding this bug! @Julien Godin
j
Nice ! you are welcome !
Can you point to the ticket if publicly available ?
j
so our jira project is internal only at the moment, but feel free to open an issue on the repo and I'll add to the ticket to update the issue with its progress
hope these steps serve as a workaround for you so you aren't blocked by this! https://puppetcommunity.slack.com/archives/C0W298S9G/p1687442066748579?thread_ts=1687430687.674709&amp;cid=C0W298S9G
j
ok, but if i want to install dependancies
y
I guess dependencies should work after
did you try?
I see you’re trying 😄
j
👀
j
That was absolutly not a vim exit command
😆 1
destination_on_container this should be
/etc/puppetlabs/code/environments/production/modules
?
j
no this is just the destination for the tar.gz file, once the module is installed it will appear there 🙂
so anywhere you choose
j
A ! ok, got it
y
/path/to/tarball.tar.gz
in the next command should match it
j
Yes! Should have said
j
yep, sorry, i didnt read the whole command before, thought it was a repetition 🙂
Seems to be working MUCH BETTER
🤞 1
Also, maybe PDK should provide the minimal requirement for a test environement ? (There is a missing dependency in the gemfile )
gem "github_changelog_generator", '= 1.15.2', require: false < this one do be precise
j
I believe @Craig Gumbley has done some dependency fixes for the next release, he might be able to give more info on that when he’s back on 🙂
j
j
Thank you!