Project

General

Profile

Actions

Bug #1443

closed

Hosts are shown as active.

Added by Oliver Weinmann over 12 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi,

since a few days all my hosts are shown as active. It looks like foreman treats a notify (notice) as an applied manifest and marks the host active.

Regards,
Oliver

Actions #1

Updated by Ohad Levy over 12 years ago

what is your puppet clients version your master? is there a difference between versions?

Actions #2

Updated by Oliver Weinmann over 12 years ago

My puppetmaster is version 2.7.9 and my clients range from 2.6.9 to 2.7.1.

Actions #3

Updated by Ohad Levy over 12 years ago

  • Status changed from New to Need more information

Oliver Weinmann wrote:

My puppetmaster is version 2.7.9 and my clients range from 2.6.9 to 2.7.1.

could you provide some reports examples?
turn reports=store on your master, and attach the yaml file to the ticket.

thanks

Actions #4

Updated by Oliver Weinmann about 12 years ago

Hi,

here is what I have in yaml for one of the active hosts:

---
parameters:
puppetmaster: puppet.a.space.corp
foreman_env: &id001 production
owner_name: Oliver Weinmann
hostgroup: Repos
root_pw: ****
owner_email:
domainname: ""
classes:
- repos
environment: *id001

I noticed that the host has 3 notices in report. The same is for all the other hosts shown as active. But a notice should not be treated as active or?

Actions #5

Updated by Jacob McCann almost 12 years ago

I would vote to leave things as they are in foreman concerning this.

Puppet treats hosts as 'active' (changes made) when using 'notify' so I think foreman should continue to do so as well.

From 'puppet apply --help':

* --detailed-exitcodes:
  Provide transaction information via exit codes. If this is enabled, an exit
  code of '2' means there were changes, an exit code of '4' means there were
  failures during the transaction, and an exit code of '6' means there were both
  changes and failures.

And some code to see what puppet thinks of this:

hostA:~ # cat test.pp
notify{'test':}
hostA:~ # puppet apply --detailed-exitcodes test.pp
notice: test
notice: /Stage[main]//Notify[test]/message: defined 'message' as 'test'
notice: Finished catalog run in 0.26 seconds
hostA:~ # echo $?
2

As you see the exitcode is 2, meaning puppet treats this as if 'there were changes'. Basically the resource was applied to give the message.

And yes, my example isn't using a master/agent setup, but I'm sure if you tested it in that configuration the results would be the same.

Actions #6

Updated by Ohad Levy almost 12 years ago

  • Target version deleted (1.0)
Actions #7

Updated by Oliver Weinmann over 11 years ago

  • Status changed from Need more information to Closed

Closed. As long as you don't use notice in your mainfests it's fine.

Actions #8

Updated by Amir Barkal about 8 years ago

Oliver Weinmann wrote:

Closed. As long as you don't use notice in your mainfests it's fine.

Is it possible to make Foreman ignore the Notify resource so that nodes will not appear to be active when using it in a manifest?

Actions

Also available in: Atom PDF