Update tag call issue

18 views
Skip to first unread message

azhar hussain

unread,
Oct 6, 2016, 11:55:27 AM10/6/16
to puppet-razor


Hey,
I recently setup a test razor environment and have come across an issue with razor update-tag call. 
The update call doesn't seem to process completely, nodes corresponding to the old config are still tagged with that name, and new nodes are not reflected.
It's behaviour is quite erratic actually, I've noticed it working correctly sometimes in real time.


+-------+-------------------+--------+--------+----------------+
| name  | dhcp_mac          | tags   | policy | metadata count |
+-------+-------------------+--------+--------+----------------+
| node1 | 00:25:90:c7:e1:06 | test1  | ---    | 0              |
+-------+-------------------+--------+--------+----------------+
| node2 | 00:25:90:c7:43:9c | (none) | ---    | 0              |
+-------+-------------------+--------+--------+----------------+

+-------+-----------------------------------------------------------------------------------+-------+----------+
| name  | rule                                                                              | nodes | policies |
+-------+-----------------------------------------------------------------------------------+-------+----------+
| test1 | ["has_macaddress", "00:25:90:c6:48:42", "00:25:90:c7:e1:06", "00:25:90:c6:d8:82"] | 1     | 0        |
+-------+-----------------------------------------------------------------------------------+-------+----------+


 razor update-tag-rule --name test1 --force --rule '["has_macaddress",  "00:25:90:c6:43:9d", "00:25:90:c7:43:9c" ]'


+-------+-------------------+--------+--------+----------------+
| name  | dhcp_mac          | tags   | policy | metadata count |
+-------+-------------------+--------+--------+----------------+
| node1 | 00:25:90:c7:e1:06 | test1  | ---    | 0              |
+-------+-------------------+--------+--------+----------------+
| node2 | 00:25:90:c7:43:9c | (none) | ---    | 0              |
+-------+-------------------+--------+--------+----------------+


select * from tags;
  1 | test1 | {"rule":["has_macaddress","00:25:90:c6:43:9d","00:25:90:c7:43:9c"]}


select * from nodes_tags;
       1 |      1

After the update node2 should have been tagges ad test1 and node1 should have been untagged. Corresponding nodes_tag table is also not updated.

Can someone provide some information into how the update call is actually functioning ?

Reply all
Reply to author
Forward
0 new messages