https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • r

    RobDog

    05/17/2022, 1:49 PM
    maybe the answer lies in the fact that the transition is using ensure=>unmounted , but using absent will remove the old value from fstab. will try
  • j

    Joshua Smeda

    05/17/2022, 1:56 PM
    Yeah, it does (tried another node too, same error). I might be missing the routes.yaml file on the Puppetserver
  • y

    Yury Bushmelev

    05/17/2022, 2:21 PM
    I'd suggest to use puppet bolt or PE task to do this ^
  • l

    Lumiere

    05/17/2022, 2:28 PM
    I agree that this is more a bolt/pe/ansible task
  • l

    Lumiere

    05/17/2022, 2:28 PM
    it's less configuration management and more orchestration
  • l

    Lumiere

    05/17/2022, 2:32 PM
    have that task drop a file at like
    /opt/puppetlabs/facter/facts.d/<mountname>_now_xfs.txt
    that just contains
    myorg_mountname_now_xfs=true
    that puppet can use to know if it needs to do xfs or ext4
  • j

    Joshua Smeda

    05/17/2022, 2:43 PM
    I replaced the actual hostnames with
    fqdn
    Copy code
    Error: Unable to compile catalog for fqdn
    	Failed to retrieve catalog for fqdn from puppet-compilers in environment staging: Certname "" must not contain unprintable or non-ASCII characters
    
    Debug: Facter: dhcpcd was not found on the PATH.
    Debug: Facter: Could not find the 'ip' command. Physical macaddress for bonded interfaces will be incorrect.
    Debug: Facter: fact "ipaddress_eth0" has resolved to "10.42.7.233".
    Debug: Compiling catalog for fqdn
    Debug: Connecting to server: puppet-compilers/puppet/v4/catalog
    Debug: Creating new connection for <https://puppet-compilers:8140>
    Debug: Starting connection for <https://puppet-compilers:8140>
    
    Error: Unable to compile catalog for fqdn
    	Failed to retrieve catalog for fqdn from puppet-compilers in environment production: Certname "" must not contain unprintable or non-ASCII characters
  • d

    David Manouchehri

    05/17/2022, 2:46 PM
    If I've created a metadata.json, but my client is using
    Puppetfile
    already, is there any legacy compatibility issues they'll likely have when using my module?
  • b

    bastelfreak

    05/17/2022, 2:46 PM
    those two files are not really related
  • s

    Slackbot

    05/17/2022, 2:47 PM
    This message was deleted.
    v
    • 2
    • 1
  • l

    Lumiere

    05/17/2022, 2:50 PM
    metadata.json
    is attempting to give information to people who look at the module,
    Puppetfile
    is telling your puppet server "I want to install this, at this version"
  • j

    Joshua Smeda

    05/17/2022, 2:54 PM
    if i run catalog diff against 1 of those 2 nodes, it passes fine. So i don’t think it’s fact related
  • d

    David Manouchehri

    05/17/2022, 2:55 PM
    Hmm, so I should skip metadata.json and write a Puppetfile by hand then?
  • l

    Lumiere

    05/17/2022, 2:56 PM
    I would do both honestly. make sure all your modules have a metadata.json that sets some basics (version and dependencies) and then build a Puppetfile that references the git by tag or (if on the forge) the forge version)
  • v

    vchepkov

    05/17/2022, 3:01 PM
    metadata.json represent dependencies of a module. Puppetfile represents dependencies of an environment
  • d

    David Manouchehri

    05/17/2022, 3:01 PM
    @Lumiere ah, so there's no automatic generator to output a Puppetfile?
  • v

    vchepkov

    05/17/2022, 3:02 PM
    generate-puppetfile gem helps
  • v

    vchepkov

    05/17/2022, 3:03 PM
    Copy code
    $ generate-puppetfile puppetlabs/apache
    
    =======================================================================
    forge '<https://forge.puppet.com>'
    
    # Modules discovered by generate-puppetfile
    mod 'puppetlabs/apache', '7.0.0'
    mod 'puppetlabs/concat', '7.2.0'
    mod 'puppetlabs/stdlib', '8.2.0'
    =======================================================================
  • d

    David Manouchehri

    05/17/2022, 3:08 PM
    Copy code
    user@dacc5717fa08:/workspaces/epic_security# pdk bundle exec rake generate_puppetfile --trace
    pdk (INFO): Using Ruby 2.7.3
    pdk (INFO): Using Puppet 7.10.0
    ** Invoke generate_puppetfile (first_time)
    ** Execute generate_puppetfile
    generate-puppetfile -c  epic-epic_security
    rake aborted!
    Command failed with status (127): [generate-puppetfile -c  epic-epic_secu...]
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_utils.rb:67:in `block in create_shell_runner'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/file_utils.rb:57:in `sh'
    /workspaces/epic_security/rakelib/generate_puppetfile.rake:6:in `block in <top (required)>'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `block in execute'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `each'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `execute'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/honeycomb-beeline-2.6.0/lib/honeycomb/integrations/rake.rb:21:in `block in execute'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/honeycomb-beeline-2.6.0/lib/honeycomb/client.rb:62:in `start_span'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/honeycomb-beeline-2.6.0/lib/honeycomb/integrations/rake.rb:16:in `execute'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task.rb:194:in `synchronize'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task.rb:194:in `invoke_with_call_chain'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/task.rb:183:in `invoke'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb:160:in `invoke_task'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `each'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block in top_level'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb:125:in `run_with_threads'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb:110:in `top_level'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb:83:in `block in run'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/lib/rake/application.rb:80:in `run'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
    /opt/puppetlabs/pdk/private/ruby/2.7.3/bin/rake:23:in `load'
    /opt/puppetlabs/pdk/private/ruby/2.7.3/bin/rake:23:in `<top (required)>'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
    /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
    /opt/puppetlabs/pdk/private/ruby/2.7.3/bin/bundle:23:in `load'
    /opt/puppetlabs/pdk/private/ruby/2.7.3/bin/bundle:23:in `<main>'
    Tasks: TOP => generate_puppetfile
  • v

    vchepkov

    05/17/2022, 3:11 PM
    it's not a public module is it?
  • d

    David Manouchehri

    05/17/2022, 3:12 PM
    ah, you're right, forgot to add it to my Gemfile
  • y

    Yorokobi

    05/17/2022, 3:12 PM
    What problem are you trying to solve?
  • y

    Yorokobi

    05/17/2022, 3:12 PM
    This feels like a x-y problem (solving for x by doing unrelated y)
  • y

    Yorokobi

    05/17/2022, 3:13 PM
    This feels like a x-y problem (solving for x by doing unrelated y)
  • j

    Joshua Smeda

    05/17/2022, 3:16 PM
    message has been deleted
  • d

    David Manouchehri

    05/17/2022, 3:22 PM
    @Yorokobi I've been using metadata.json to specify dependencies like most modern tutorials suggest, and maintaining a duplicate Puppetfile by hand seems kinda annoying
  • b

    bastelfreak

    05/17/2022, 3:24 PM
    I've you're developing a module, document all its dependencies in the metadata.json
  • d

    David Manouchehri

    05/17/2022, 3:24 PM
    Right, already done 🙂
  • b

    bastelfreak

    05/17/2022, 3:25 PM
    If you manage a Puppetserver, use a Puppetfile to collect all modules you want to deploy on the puppetserver
  • d

    David Manouchehri

    05/17/2022, 3:26 PM
    Will the person managing the Puppetserver need to manually list all the dependencies I already listed in
    metadata.json
    ...?
1...424344...428Latest