Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to use _catch_errors for apply_prep function in puppet plan #3290

Open
srikanth2302 opened this issue Apr 1, 2024 · 3 comments
Open
Labels
Bug Bug reports and fixes.

Comments

@srikanth2302
Copy link

Describe the Bug

apply_prep function unable to catch errors to go further in a plan. It says 'apply_prep' expects 1 argument, got 2"

Expected Behavior

apply_prep function needs to catch error so that even if 1/10 nodes failed need to proceed further tasks in a plan.

Steps to Reproduce

Tried below ways to catch errors in apply_prep function

Method 1:
$apply_prep_result = apply_prep($target_nodes,
{
'_catch_errors' => true
})
Method 2:
$apply_prep_result = apply_prep($target_nodes,'_catch_errors' => true)

Environment

  • Version - Puppet Enterprise 2021.7
  • Platform - Ubuntu 20.04
@srikanth2302 srikanth2302 added the Bug Bug reports and fixes. label Apr 1, 2024
@srikanth2302 srikanth2302 changed the title unable to use _catch_errors for apply_prep function in pupept plan unable to use _catch_errors for apply_prep function in puppet plan Apr 1, 2024
@donoghuc
Copy link
Member

donoghuc commented Apr 1, 2024

Bolt supports this as of 9dcbd88 . I'm assuming you are not running this plan through bolt as a system package or gem, but rather through the orchestrator in PE?

@srikanth2302
Copy link
Author

srikanth2302 commented Apr 1, 2024

Yes.. This Plan is run via PE Console and not through any bolt commands.

@srikanth2302
Copy link
Author

Can this be feasible to get ResultSet Info as well Instead of BoltResultSet for apply_prep() to run via orchestrator PE Console Plan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug reports and fixes.
Projects
None yet
Development

No branches or pull requests

2 participants