[Puppet Users] Re: Exit status of "puppet agent --test"

2023-04-03 Thread Marty Ewings


Yes it does, please see 
https://www.puppet.com/docs/puppet/7/man/agent.html#usage-notes excerpt 
below:


'--test' runs once in the foreground with verbose logging, then exits. It 
also exits if it can't get a valid catalog. --test includes the 
'--detailed-exitcodes' option by default and exits with one of the 
following exit codes:

   - 
   
   0: The run succeeded with no changes or failures; the system was already 
   in the desired state.
   - 
   
   1: The run failed, or wasn't attempted due to another run already in 
   progress.
   - 
   
   2: The run succeeded, and some resources were changed.
   - 
   
   4: The run succeeded, and some resources failed.
   - 
   
   6: The run succeeded, and included both changes and failures.
   

Marty

On Monday, April 3, 2023 at 10:48:11 AM UTC+1 Chris Ritson wrote:

> Does a manual puppet agent run (puppet agent --test) have a defined exit 
> status to indicate if errors were detected? This is not described by the 
> built-in help. In two test cases, I have only seen a return code of 2. Both 
> runs made some changes. One had warnings, the other didn't.
>
> --
> Chris Ritson (School of Computing and NUIT Cybersecurity team)
> Newcastle University, NE1 7RU
> Tel: +44(0)1912080073 <+44%20191%20208%200073>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/71c4aa87-4d19-4b33-a244-3e9b43f361e8n%40googlegroups.com.


[Puppet Users] Re: Is "Sensitive" broken?

2020-09-09 Thread Marty Ewings
Hi There

https://puppet.com/docs/puppet/6.17/lang_data_sensitive.html

You need to "unwrap" the sensitive data in order to consume the original 
data in a function

On Wednesday, September 9, 2020 at 2:17:34 PM UTC+1 Dirk Heinrichs wrote:

> Hi,
>
> tried to use the "Sensitive" data type for the first time (with Puppet 
> 6.18.0), but it doesn't work as expected (found and followed several 
> tutorials on the net, see links below), also using the "lookup_options" 
> method to ensure the Hiera-provided value is indeed converted to sensitive.
>
> Here's my sample code (Hiera files omitted):
>
> class test (Sensitive $foo) {
>   file {'/tmp/foo':
> content => "${foo}\n",
>   }
> }
>
> When I run this, I get:
>
> Notice: /Stage[main]/Test/File[/tmp/foo]/content: 
> --- /tmp/foo2020-09-09 07:53:40.166807782 +0200
> +++ /tmp/puppet-file20200909-18841-zq93gr   2020-09-09 
> 14:55:05.569695841 +0200
> @@ -1 +1 @@
> -bar
> +Sensitive [value redacted]
>
> Notice: /Stage[main]/Test/File[/tmp/foo]/content: content changed 
> '{md5}fc552...' to '{md5}48a07...'
>
> and then the file indeed looks like this:
>
> # cat /tmp/foo 
> Sensitive [value redacted]
>
> instead of containing the real value provided in Hiera.
>
> Any ideas?
>
> Thanks...
>
> Dirk
>
> https://blog.example42.com/2019/04/04/puppet_sensitive_data/
> https://www.puppetcookbook.com/posts/hide-sensitive-values.html
> https://puppet.com/blog/my-journey-securing-sensitive-data-puppet-code/
> -- 
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18 <+49%202226%201596618>
> *Email*: dhei...@opentext.com
> *Website*: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, 
> Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
> This e-mail may contain confidential and/or privileged information. If you 
> are not the intended recipient (or have received this e-mail in error) 
> please notify the sender immediately and destroy this e-mail. Any 
> unauthorized copying, disclosure or distribution of the material in this 
> e-mail is strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
> Weitergabe dieser Mail sind nicht gestattet.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/38f9ada3-c918-4260-8953-4e54de9ddf6dn%40googlegroups.com.


[Puppet Users] Re: After puppet 3.8 - 6.17 upgrade, missing lots of pre-defined facters

2020-08-03 Thread Marty Ewings
Hi There

Please find the complete list of core facts, those distributed with the 
embedded facter here:

https://puppet.com/docs/puppet/6.17/core_facts.html#zfs_version

ZFS_version is present, however this is a solaris only fact.

there are a number of legacy facts hidden by default, they usually have 
modern equivalents, please see the above link for a description





On Monday, August 3, 2020 at 2:40:00 PM UTC+1 paul@gmail.com wrote:

>
> I upgraded recently from puppet 3.8 to 6.17 on CentOS 7 using the 
> http://yum.puppetlabs.com/puppet6/el/7/ repos.  The puppet-agent package 
> replaced the facter package.
>
> I notice a lot of facters that existed before are missing.  For example 
> zfs_version
>
> Were lots of these removed for specific reasons or am I missing an 
> additional package I should install to get these extra facters that used to 
> be builtin to the main package?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/29e6bc37-8eb1-4074-87d7-55df9a266d51n%40googlegroups.com.


[Puppet Users] Re: Unable to upgarde the puppet agents (windows) from 2019.1.0 to 2019.5.0

2020-07-23 Thread Marty Ewings
As this Is Puppet Enterprise, this sort of issue is best suited for a 
support ticket, if you cant raise one ( or need help with access) let me 
know  https://support.puppet.com/hc/en-us

 May i ask which company you work for and if you are a designated support 
contact?

On Thursday, July 23, 2020 at 1:30:16 PM UTC+1 vina...@gmail.com wrote:

> Hi KevinR,
>
> Thanks for your comment, but would like to test on one machine initially 
> and then will move to rest of the agents. But facing script halted and 
> agent is not getting upgraded. 
>
> Regards
> Vinay
>
>
> On Tuesday, July 21, 2020 at 7:33:43 PM UTC+5:30, KevinR wrote:
>>
>> Hi Vinay,
>>
>> instead of manually updating, take a look at using the puppet_agent 
>> 
>>  
>> module, this automatically upgrades agents to the correct version that 
>> belong to the PE version you're running.
>> Simply add the module to your control repo's Puppetfile and add this 
>> declaration to a manifest that gets applied to all nodes (e.g. your 
>> baseline):
>>
>> class {'::puppet_agent':
>>   package_version => 'auto'
>> }
>>
>> -KevinR
>> On Tuesday, July 21, 2020 at 7:07:44 AM UTC+2 vina...@gmail.com wrote:
>>
>>> Hi All,
>>>
>>> My PE successfully upgraded from 2019.1.0 to 2019.5.0 but I am unable to 
>>> upgrade my puppet agents (windows) from 2019.1.0 to 2019.5.0. 
>>>
>>> followed the document: 
>>> https://puppet.com/docs/pe/2019.5/upgrading_agents.html
>>>
>>> Latest MSI file is available in PE and agent as well (tried by 
>>> installing the MSI manually , able to install the MSI: Version got changed 
>>> to 6.14.0 as expected). 
>>>
>>> Manually ran the puppet agent -t on agent , also getting the below error.
>>>
>>> Getting error : change from false to true failed: Failed previous 
>>> installation with: ScriptHalted
>>>
>>> Source: 
>>> /Stage[main]/Puppet_agent::Install::Windows/Puppet_agent_upgrade_error[puppet_agent_upgrade_failure.log]/ensure_notexistFile:
>>>  
>>> /etc/puppetlabs/code/environments/development/modules/puppet_agent/manifests/install/windows.ppLine:
>>>  
>>> 41
>>>
>>> Failed previous installation with: ScriptHalted
>>> Source: Puppet
>>>
>>> kindly suggest your inputs to address this issue.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/18f2e95a-ef01-4fec-a88f-c9d060655267n%40googlegroups.com.


[Puppet Users] Re: Consequences of having the compatible puppet agent version

2020-07-10 Thread Marty Ewings

HI There.

While the older agents are compatible, it is advisable to upgrade as you 
will not be able to use some new functionality, and you will be missing any 
bug fixes found since that version, lists can be found here:

https://puppet.com/docs/puppet/latest/release_notes_puppet.html

Secondly, as this is PE there are implications for Support, the advice will 
be to replicate any issues on the current version, and all fixes can only 
be put into newer versions of the agent


On Friday, July 10, 2020 at 12:24:31 PM UTC+1 vina...@gmail.com wrote:

> Hi Team,
>
> I have upgraded the PE from 2019.1.0 to 2019.5.0. As per the component 
> versions table 2019.1.0 puppet agents (6.4.2) are compatible with PE 
> 2019.5.0 
>
>
> https://puppet.com/docs/pe/2019.5/component_versions_in_recent_pe_releases.html
>  
>
> Any consequences if i am not upgrade my puppet agents to 6.14.0 (version 
> in puppet master) ?? yeah, its suggestible to maintain both PE and agent on 
> same version. But what are the drawbacks if both are in compatible versions.
>
> Regards
> Vinay 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/37d46cf3-c255-44f3-8c77-a4999c4f9a2an%40googlegroups.com.


[Puppet Users] Re: how to downgrade the agent on puppet from 6.16.0 to 6.14.0

2020-07-02 Thread Marty Ewings
The agent you need should be here:
/opt/puppetlabs/server/data/packages/public/current/ubuntu-18.04-amd64/puppet-agent-6.14*

downgrade to that version using the command above.


Downgrading in PE is not possible, as there is no way to bring the DB 
schema backwards.

You would need to recover from backup or snapshot, i believe if you ensure 
you install the correct agent as above, and make sure you don't have an 
open source repo in referenced by apt-get you should be ok

However if you have a support contract i recommend opening a case

On Thursday, July 2, 2020 at 4:21:24 PM UTC+1 vina...@gmail.com wrote:

> Hi Team,
>
> Is there any way to downgrade the puppet master  (other than backup and 
> restore process ) ?
>
> Regards
> Vinay
>
>
> On Thursday, July 2, 2020 at 7:43:43 PM UTC+5:30, Vinay Korrapati wrote:
>>
>> Hi Marty,
>>
>> Thanks for your quick response. No packages are available under 
>> opt/puppetlabs/server/data/packages/public/(*current/2019.5.0*
>> )/ubuntu-18.04-amd64-6.16.0.
>>
>> ubuntu-18.04-amd64-6.14.0 contains all the expected (*2019.5.0*) 
>> packages.
>>
>> Kindly suggest further. 
>>
>> Regards
>> Vinay
>>
>>
>>
>> On Thursday, July 2, 2020 at 7:25:16 PM UTC+5:30, Marty Ewings wrote:
>>>
>>> I would downgrade your installation of the agent with the command:
>>>
>>> sudo dpkg -i 
>>> /opt/puppetlabs/server/data/packages/public/latest//>>
>>> Filling in the appropriate os and package names
>>>
>>> And ensure your OS does not have any repositories installed that would 
>>> allow Puppet to upgrade to the lastest opensource version when you run 
>>> apt-get 
>>>
>>> As this is Puppet Enterprise, if you have a support contract i recommend 
>>> opening a ticket with support for full details
>>>
>>>
>>>
>>> On Thursday, July 2, 2020 at 2:25:49 PM UTC+1 vina...@gmail.com wrote:
>>>
>>>> Hi Marty,
>>>>
>>>> Thanks for your response. No , we are installed the latest version of 
>>>> Puppet Enterprise 2019.5.0. Even same we can see from the puppet console. 
>>>>
>>>> Post up gradation, unfortunately ran the  : sudo apt update && sudo 
>>>> apt upgrade Which causes to take the PE master infrastructure (agent) 
>>>> to the latest version 6.16.0.
>>>>
>>>> In 
>>>> opt/puppetlabs/server/data/packages/public/2019.5.0/Puppet_enterprise 
>>>> contains the 2019.5.0 packages only. 
>>>>
>>>> Kindly suggest further.
>>>>
>>>>
>>>> On Thursday, July 2, 2020 at 6:34:50 PM UTC+5:30, Marty Ewings wrote:
>>>>>
>>>>> Hi There,
>>>>>
>>>>>  datadog-agent isnt the Puppet agent, this is a separate telemetry 
>>>>> product
>>>>>
>>>>> This sounds like you may have installed the latest open source puppet 
>>>>> repository which is overwriting the one Puppet enterprise requires to 
>>>>> function
>>>>>
>>>>> `dpkg-query --show --showformat '${Package}\n' | grep 
>>>>> --extended-regexp '^pe-|^puppet'`
>>>>>
>>>>> Check the list for the presence of an 
>>>>> open-source puppet6-release package,
>>>>>
>>>>> remove it if present, and then install the appropriate version from 
>>>>> the local path:
>>>>>
>>>>> sudo dpkg -i 
>>>>> /opt/puppetlabs/server/data/packages/public/latest//>>>>
>>>>>
>>>>> On Thursday, July 2, 2020 at 1:49:38 PM UTC+1 vina...@gmail.com wrote:
>>>>>
>>>>>> Hi Team,
>>>>>>
>>>>>> We have upgrade our PE to 2019.5.0 from 2019.1.0. We could observe 
>>>>>> the Puppet console showing the correct version which is 2019.5.0.
>>>>>>
>>>>>> But when we ran the puppet --version we are getting the 6.16.0 rather 
>>>>>> than 6.14.0.
>>>>>>
>>>>>> we are unable to downgrade the puppet agent version from 6.16.0 to 
>>>>>> 6.14.0. when we use the below command we are getting *"unable to 
>>>>>> locate package datadog-agent". * But the package is existing and we 
>>>>>> tried to execute the command from the root & package location, no luck. 
>>>>>>
>>>>>> sudo apt-get update && sudo apt-get install --allow-downgrades 
>>>>>> datadog-agent=1:6.14.0-1
>>>>>>
>>>>>> Requesting to provide inputs to address this issue.
>>>>>>
>>>>>> Regards
>>>>>> Vinay
>>>>>>
>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/923a8459-0fe6-4a19-bf58-b731b4165e69n%40googlegroups.com.


[Puppet Users] Re: how to downgrade the agent on puppet from 6.16.0 to 6.14.0

2020-07-02 Thread Marty Ewings
I would downgrade your installation of the agent with the command:

sudo dpkg -i 
/opt/puppetlabs/server/data/packages/public/latest// Hi Marty,
>
> Thanks for your response. No , we are installed the latest version of 
> Puppet Enterprise 2019.5.0. Even same we can see from the puppet console. 
>
> Post up gradation, unfortunately ran the  : sudo apt update && sudo apt 
> upgrade Which causes to take the PE master infrastructure (agent) to the 
> latest version 6.16.0.
>
> In opt/puppetlabs/server/data/packages/public/2019.5.0/Puppet_enterprise 
> contains the 2019.5.0 packages only. 
>
> Kindly suggest further.
>
>
> On Thursday, July 2, 2020 at 6:34:50 PM UTC+5:30, Marty Ewings wrote:
>>
>> Hi There,
>>
>>  datadog-agent isnt the Puppet agent, this is a separate telemetry product
>>
>> This sounds like you may have installed the latest open source puppet 
>> repository which is overwriting the one Puppet enterprise requires to 
>> function
>>
>> `dpkg-query --show --showformat '${Package}\n' | grep --extended-regexp 
>> '^pe-|^puppet'`
>>
>> Check the list for the presence of an open-source puppet6-release package,
>>
>> remove it if present, and then install the appropriate version from the 
>> local path:
>>
>> sudo dpkg -i 
>> /opt/puppetlabs/server/data/packages/public/latest//>
>>
>> On Thursday, July 2, 2020 at 1:49:38 PM UTC+1 vina...@gmail.com wrote:
>>
>>> Hi Team,
>>>
>>> We have upgrade our PE to 2019.5.0 from 2019.1.0. We could observe the 
>>> Puppet console showing the correct version which is 2019.5.0.
>>>
>>> But when we ran the puppet --version we are getting the 6.16.0 rather 
>>> than 6.14.0.
>>>
>>> we are unable to downgrade the puppet agent version from 6.16.0 to 
>>> 6.14.0. when we use the below command we are getting *"unable to locate 
>>> package datadog-agent". * But the package is existing and we tried to 
>>> execute the command from the root & package location, no luck. 
>>>
>>> sudo apt-get update && sudo apt-get install --allow-downgrades 
>>> datadog-agent=1:6.14.0-1
>>>
>>> Requesting to provide inputs to address this issue.
>>>
>>> Regards
>>> Vinay
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7bbaddf9-20df-465c-a803-4b517fb1745fn%40googlegroups.com.


[Puppet Users] Re: how to downgrade the agent on puppet from 6.16.0 to 6.14.0

2020-07-02 Thread Marty Ewings
Hi There,

 datadog-agent isnt the Puppet agent, this is a separate telemetry product

This sounds like you may have installed the latest open source puppet 
repository which is overwriting the one Puppet enterprise requires to 
function

`dpkg-query --show --showformat '${Package}\n' | grep --extended-regexp 
'^pe-|^puppet'`

Check the list for the presence of an open-source puppet6-release package,

remove it if present, and then install the appropriate version from the 
local path:

sudo dpkg -i 
/opt/puppetlabs/server/data/packages/public/latest// Hi Team,
>
> We have upgrade our PE to 2019.5.0 from 2019.1.0. We could observe the 
> Puppet console showing the correct version which is 2019.5.0.
>
> But when we ran the puppet --version we are getting the 6.16.0 rather than 
> 6.14.0.
>
> we are unable to downgrade the puppet agent version from 6.16.0 to 6.14.0. 
> when we use the below command we are getting *"unable to locate package 
> datadog-agent". * But the package is existing and we tried to execute the 
> command from the root & package location, no luck. 
>
> sudo apt-get update && sudo apt-get install --allow-downgrades 
> datadog-agent=1:6.14.0-1
>
> Requesting to provide inputs to address this issue.
>
> Regards
> Vinay
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/dd0ea5c7-deb6-473f-855f-5cbf85a91a4bn%40googlegroups.com.


[Puppet Users] Re: Puppet enterprise replication error

2019-07-04 Thread Marty Ewings
HI There!

Can you verify you are running a monolithic Master of 2019.1? With a target 
agent node that is currently under puppet management and is connected to 
orchestrator, however has no other Puppet software installed other than the 
agent?

On the Current Primary Master, are you able to check the puppetdb.log to 
make sure the service is in started and clean state, and not continually 
restarting?
 
/var/log/puppetlabs/puppetdb/puppetdb.log

Many Thanks

Marty

On Thursday, July 4, 2019 at 12:20:12 PM UTC+1, Afroz Hussain wrote:
>
> Hello All,
>
> I have tried to replicate my primary Puppet master  by referring 
> https://puppet.com/docs/pe/2019.1/configure_high_availability.html
> getting errors as(every run gives different errors)
>
> puppet infrastructure provision replica master1.example.com --token-file 
> ./.puppetlabs/token
> Error: Orchestrator is not running
> PuppetDB is not running
> Puppet cannot provision a primary master replica until all required 
> services are running.
> Error: Try 'puppet infrastructure help provision' for usage
> 
> Error: Code Manager is not running
> File Sync Storage Service is not running
> Classifier is not running
> RBAC is not running
> Activity Service is not running
> Orchestrator is not running
> PCP Broker is not running
> PCP Broker v2 is not running
> PuppetDB is not running
> Puppet cannot provision a primary master replica until all required 
> services are running.
> Error: Try 'puppet infrastructure help provision' for usage
> --
> I verified all the required service, all are running:
>
> pe-bolt-server.service  --running
> pe-console-services.service --running
> pe-nginx.service --running
> pe-orchestration-services.service --running
> pe-plan-executor.service --running
> pe-postgresql.service --running
> pe-puppetdb.service -- running
> pe-puppetserver.service --running
> pxp-agent.service --running
>
>
> Any help would be appreciated!
>
> Thanks
> Afroz
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9fdbff14-4b62-4d67-b9d1-dab9f587df85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.