Policy Count field

39 views
Skip to first unread message

Stephen Brown

unread,
Mar 21, 2014, 9:50:49 AM3/21/14
to puppet...@googlegroups.com
Hi just a quick question about razors Counter field

I have a policy:
$ razor policy
#  Enabled        Label                     Tags                 Model Label      #/Max  Counter           UUID           
1  true    server-s-ctrl       [namenode_tag]              server-s-ctrl       1/1   2        dG1avw2t1e7EBAbMiCiUh

$ razor policy dG1avw2t1e7EBAbMiCiUh
  UUID =>  dG1avw2t1e7EBAbMiCiUh
 Line Number =>  7
 Label =>  server-s-ctrl
 Enabled =>  true
 Template =>  linux_deploy
 Description =>  Policy for deploying a Linux-based operating system.
 Tags =>  [namenode_tag]
 Model Label =>  server-s-ctrl 
 Broker Target => server-s-ctrl-brk
 Currently Bound =>  1
 Maximum Bound =>  1
 Bound Counter =>  2


I'm doing a lot of testing with razor and just one server.

I didn't expect the counter to go past my max count limit, why is this?
also how can I now reset the counter to 0 is this possible?

David Lutterkort

unread,
Mar 21, 2014, 12:48:58 PM3/21/14
to puppet...@googlegroups.com
Hi Stephen,

it seems that you are still on the old Razor; we have (starting last
summer) rewritten it completely, and I highly recommend that you
switch to that code base[1] If you want a quick overview of what it
looks like using the new Razor, check out the demo video[2] Also,
there are talks by yours truly explaining what we were thinking ;) [3]

I am not entirely sure why you see the bound counter go above the
maximum, but the old code does have known races in handling the logic
around maximum bound nodes, so that two nodes that check in
simultaneously could cause more nodes than the maximum to be bound to
the policy.

David

[1] https://github.com/puppetlabs/razor-server
[2] https://www.youtube.com/watch?v=v7jgwPf85BY (it's for PE 3.2, but
largely applies to OSS Razor, too)
[3] https://www.youtube.com/watch?v=w3tO0Un0Ppc
> --
> You received this message because you are subscribed to the Google Groups
> "puppet-razor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-razor...@googlegroups.com.
> To post to this group, send email to puppet...@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-razor.
> For more options, visit https://groups.google.com/d/optout.

Kevin Sweeney

unread,
Aug 12, 2015, 4:00:39 PM8/12/15
to puppet-razor
Hi David,

I'm seeing this on v0.16.1-1. I have a tag that matches all hosts, but two policies both using that tag, one with max-count of 1 and other with unlimited so the first node gets first policy and all others get the second policy. This (seemingly) has been working without a problem but just recently we are seeing more than 1 node in the policy with max-count = 1. Is this simply a race condition and we should deal with it by spacing out our boots or is there another solution?

TIA,
Kevin
Reply all
Reply to author
Forward
0 new messages