Problem with Razor 1.7.0

70 views
Skip to first unread message

Tim Bishop

unread,
Feb 1, 2018, 1:25:11 PM2/1/18
to puppet...@googlegroups.com
Hi,

I'm seeing an issue where two nodes, on a fresh Razor 1.7.0 install,
both think they're the same node. So the first boots and creates a new
node, then the second boots and Razor thinks it's the same one and
merges the details, rather than creating a new node. Here's an excerpt
from the log which shows what's going on:

18:14:46,508 INFO [razor.sequel] (http-/0.0.0.0:8150-1) (0.004000s) SELECT * FROM "nodes" WHERE ("hw_info" && ARRAY['fact_boot_type=pcbios','mac=fa-16-3e-61-dc-6e'])
18:14:46,530 INFO [razor.sequel] (http-/0.0.0.0:8150-1) (0.007000s) INSERT INTO "nodes" ("hw_info", "dhcp_mac") VALUES (ARRAY['fact_boot_type=pcbios','mac=fa-16-3e-61-dc-6e','serial=456c604b-cf58-4ccc-b152-c2c4a56512cc','uuid=55760d85-238a-43ad-b59a-5400eb3b803f']::text[], 'fa-16-3e-61-dc-6e') RETURNING *
18:14:46,590 INFO [razor.sequel] (http-/0.0.0.0:8150-1) (0.003000s) UPDATE "nodes" SET "hw_info" = ARRAY['fact_boot_type=pcbios','mac=fa-16-3e-61-dc-6e','serial=456c604b-cf58-4ccc-b152-c2c4a56512cc','uuid=55760d85-238a-43ad-b59a-5400eb3b803f']::text[], "dhcp_mac" = 'fa-16-3e-61-dc-6e', "policy_id" = NULL, "facts" = NULL, "hostname" = NULL, "root_password" = NULL, "boot_count" = 0, "last_checkin" = NULL, "ipmi_hostname" = NULL, "ipmi_username" = NULL, "ipmi_password" = NULL, "last_power_state_update_at" = NULL, "metadata" = '{}', "installed" = NULL, "installed_at" = NULL, "desired_power_state" = NULL, "last_known_power_state" = NULL, "name" = 'node5' WHERE ("id" = 5)
18:14:46,664 INFO [razor.web.log] (http-/0.0.0.0:8150-1) 1.2.3.4 - - [01/Feb/2018:18:14:46 +0000] "GET /svc/boot?net0=fa-16-3e-61-dc-6e&net1=&net2=&net3=&dhcp_mac=fa-16-3e-61-dc-6e&serial=456c604b-cf58-4ccc-b152-c2c4a56512cc&asset=&uuid=55760d85-238a-43ad-b59a-5400eb3b803f&fact_boot_type=pcbios " 200 569 0.2040

18:14:49,214 INFO [razor.sequel] (http-/0.0.0.0:8150-2) (0.001000s) SELECT * FROM "nodes" WHERE ("hw_info" && ARRAY['fact_boot_type=pcbios','mac=fa-16-3e-ac-14-de'])
18:14:49,266 INFO [razor.sequel] (http-/0.0.0.0:8150-2) (0.001000s) UPDATE "nodes" SET "hw_info" = ARRAY['fact_boot_type=pcbios','mac=fa-16-3e-61-dc-6e','serial=456c604b-cf58-4ccc-b152-c2c4a56512cc','uuid=55760d85-238a-43ad-b59a-5400eb3b803f']::text[], "dhcp_mac" = 'fa-16-3e-ac-14-de', "policy_id" = NULL, "facts" = NULL, "hostname" = NULL, "root_password" = NULL, "boot_count" = 0, "last_checkin" = NULL, "ipmi_hostname" = NULL, "ipmi_username" = NULL, "ipmi_password" = NULL, "last_power_state_update_at" = NULL, "metadata" = '{}', "installed" = NULL, "installed_at" = NULL, "desired_power_state" = NULL, "last_known_power_state" = NULL, "name" = 'node5' WHERE ("id" = 5)
18:14:49,349 INFO [razor.sequel] (http-/0.0.0.0:8150-2) (0.006000s) UPDATE "nodes" SET "hw_info" = ARRAY['fact_boot_type=pcbios','mac=fa-16-3e-61-dc-6e','serial=456c604b-cf58-4ccc-b152-c2c4a56512cc','uuid=55760d85-238a-43ad-b59a-5400eb3b803f']::text[], "dhcp_mac" = 'fa-16-3e-ac-14-de', "policy_id" = NULL, "facts" = NULL, "hostname" = NULL, "root_password" = NULL, "boot_count" = 0, "last_checkin" = NULL, "ipmi_hostname" = NULL, "ipmi_username" = NULL, "ipmi_password" = NULL, "last_power_state_update_at" = NULL, "metadata" = '{}', "installed" = NULL, "installed_at" = NULL, "desired_power_state" = NULL, "last_known_power_state" = NULL, "name" = 'node5' WHERE ("id" = 5)
18:14:49,393 INFO [razor.web.log] (http-/0.0.0.0:8150-2) 1.2.3.5 - - [01/Feb/2018:18:14:49 +0000] "GET /svc/boot?net0=fa-16-3e-ac-14-de&net1=&net2=&net3=&dhcp_mac=fa-16-3e-ac-14-de&serial=456c604b-cf58-4ccc-b152-c2c4a56512cc&asset=&uuid=5455b562-a970-4054-89e5-0ccf7f4700af&fact_boot_type=pcbios " 200 569 0.2520

Looking at that SELECT I see that it always matches, regardless of MAC
address:

razor=> SELECT id,name FROM "nodes" WHERE ("hw_info" && ARRAY['fact_boot_type=pcbios','mac=fa-16-3e-61-dc-6e']);
id | name
----+-------
5 | node5
(1 row)

razor=> SELECT id,name FROM "nodes" WHERE ("hw_info" && ARRAY['fact_boot_type=pcbios','mac=fa-16-3e-ac-14-de']);
id | name
----+-------
5 | node5
(1 row)

razor=> SELECT id,name FROM "nodes" WHERE ("hw_info" && ARRAY['fact_boot_type=pcbios','mac=anything-i-want']);
id | name
----+-------
5 | node5
(1 row)

Is this a problem with both systems having fact_boot_type=pcbios?
Looking at the change log for 1.7.0 I see this is a new thing, so could
be that not many people have had a chance to use this code yet?

This is my first jump in to the "new" razor after the rewrite a good
number of years ago, and I've started with 1.7.0, so I can't say if this
happened in earlier versions.

Any advice on how to proceed?

Tim.

--
Tim Bishop
http://www.bishnet.net/tim/
PGP Key: 0x6C226B37FDF38D55

Tim Bishop

unread,
Feb 1, 2018, 2:22:39 PM2/1/18
to 'Tim Bishop' via puppet-razor
On Thu, Feb 01, 2018 at 06:25:05PM +0000, 'Tim Bishop' via puppet-razor wrote:
> Is this a problem with both systems having fact_boot_type=pcbios?
> Looking at the change log for 1.7.0 I see this is a new thing, so could
> be that not many people have had a chance to use this code yet?
>
> This is my first jump in to the "new" razor after the rewrite a good
> number of years ago, and I've started with 1.7.0, so I can't say if this
> happened in earlier versions.

Just to follow up on this point. It works fine with 1.6.1. Specifically,
the change in bootstrap.ipxe that this commit introduces makes the
difference:

https://github.com/puppetlabs/razor-server/commit/577afb712d5070f740215feaabe8ef7e4b4e0b51

I went back to 1.7.0 and kept the old bootstrap.ipxe and it continued to
work.

As an aside, upgrading (and downgrading) broke:

Preparing to unpack .../razor-server_1.7.0-1xenial_all.deb ...
Attempting to undeploy razor-server-knob.yml
Undeployed: razor-server-knob.yml
from: /opt/puppetlabs/server/apps/razor-server/share/torquebox/jboss/standalone/deployments
dpkg: error processing archive
/var/cache/apt/archives/razor-server_1.7.0-1xenial_all.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
usermod: no changes

I hope this is something about my setup, rather than a more general
issue upgrading Razor on Ubuntu.

Scott McClellan

unread,
Feb 5, 2018, 5:28:48 PM2/5/18
to puppet...@googlegroups.com
Hey Tim,

Thanks for the message. I'm looking into this right now and should have a fix out later this week. For now, I'm tracking this under https://tickets.puppetlabs.com/browse/RAZOR-1045.

We'll pull the 1.7.0 release, since it appears broken for new installs (via the included bootstrap.ipxe script) and have 1.7.1 out ASAP.

Scott

--
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 https://groups.google.com/group/puppet-razor.
For more options, visit https://groups.google.com/d/optout.
--
-- 

Scott McClellan

unread,
Feb 8, 2018, 11:20:05 AM2/8/18
to puppet...@googlegroups.com

Hi Tim,

Just to follow up on this: We've released razor-server version 1.7.1, which fixes the issue you encountered. Let me know if you need anything else from our side, and I apologize for the inconvenience!

Razor 1.7.1 release email is here:
https://groups.google.com/forum/m/#!topic/puppet-razor/G3Ru-_ucHGU

Scott

Tim Bishop

unread,
Feb 8, 2018, 3:32:15 PM2/8/18
to puppet...@googlegroups.com
Hi Scott,

How long until the package hits the repositories? The change looked good
on GitHub though, but I'd like to test it out.

Tim.
> > PuppetConf 2016 <https://puppet.com/puppetconf>, 19 - 21 October, San
> > Diego, California
> > *Register to attend or sign up to view the Live Stream
> > <https://puppet.com/puppetconf/registration-pricing>*
> >
>
>
> --
> --
> PuppetConf 2016 <https://puppet.com/puppetconf>, 19 - 21 October, San
> Diego, California
> *Register to attend or sign up to view the Live Stream
> <https://puppet.com/puppetconf/registration-pricing>*

Scott McClellan

unread,
Feb 9, 2018, 4:15:05 PM2/9/18
to puppet...@googlegroups.com
Hi Tim,

Are you able to see the new release (1.7.1) in the puppet5 release repository? E.g. http://yum.puppetlabs.com/puppet5/

If you're not seeing this, please let me know.

Scott
--
-- 
PuppetConf 2016, 19 - 21 October, San Diego, California

Tim Bishop

unread,
Feb 9, 2018, 6:43:20 PM2/9/18
to puppet...@googlegroups.com
Hi Scott,

I'm using Ubuntu and the PC1 and main archives, not puppet5. I can't see
1.7.1 in either location yet:

http://apt.puppet.com/pool/xenial/main/r/razor-server/
http://apt.puppet.com/pool/xenial/PC1/r/razor-server/

But it is in puppet5:

http://apt.puppet.com/pool/xenial/puppet5/r/razor-server/

I guess it just hasn't been published in all the places? Not quite sure
why there are so many different ones tbh.

Tim.

Scott McClellan

unread,
Feb 12, 2018, 3:07:21 PM2/12/18
to puppet...@googlegroups.com
Hi Tim,

The 1.7.0 version was shipped to the `main` repo by mistake; we'll ship 1.7.1 there just so this particular bug can be fixed. PC1 only contains releases of razor-server up to 1.6.1. Going forward, you'll find razor-server released only in the `puppet5` repo, which should simply things. Apologies for the variety of places we've shipped in the past!

Hope that helps.

Scott
--
-- 
PuppetConf 2016, 19 - 21 October, San Diego, California

Tim Bishop

unread,
Feb 13, 2018, 6:45:51 AM2/13/18
to puppet...@googlegroups.com
Hi Scott,

So what's the best way for people using puppet 4 to get the latest Razor
releases? Are versions after 1.6.1 somehow not compatible?

Tim.

Scott McClellan

unread,
Feb 22, 2018, 1:39:14 PM2/22/18
to puppet...@googlegroups.com
Hi Tim,

Apologies for the late reply, we've been determining the best place to put these releases going forward. The latest Razor releases will be on both PC1 and puppet5.

Version 1.7.1 should now be available in the `main` location as well.

Hope that helps, and thanks again for your messages here! Let me know if you have any other questions/issues.

Scott
-- 
PuppetConf 2016, 19 - 21 October, San Diego, California
Reply all
Reply to author
Forward
0 new messages