Feature #15669
A more helpful error message when the puppet master is at the wrong version (2.7.x to 3.0)
| Status: | Closed | Start date: | 07/24/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | usability | |||
| Target version: | - | |||
| Affected Puppet version: | Branch: | |||
| Keywords: | errors | |||
Description
At present, between the 2.7.x and 3.0 transition, when you have a 3.0 agent talk to a 2.7.x master you get the following:
Error: Failed to apply catalog: Could not intern from pson: source '"#<Puppet::Node:0x7f' not in PSON!
I imagine it won’t be this simple, and this may not be the only case where that output is produced, but could we not add some code to the 2.7.x branch that detects that, and maybe goes “Hey, I’m not saying it’s definitely this, but is your master older than your client? That’s not cool buddy.”
With the move to semver, can we not have that in the handshake, before we get to this part? So the agent/master tell each other what they are and what to expect? Like SSH does with it’s connect.
I imagine this bump is going to be hit a few times for people. Partly why I’m “documenting” it here. (and added the doc team as watchers)
Related issues
History
#1
Updated by Ben Hughes 11 months ago
- Description updated (diff)
#2
Updated by Randall Hansen 11 months ago
This is unhelpful and we should fix it.
#3
Updated by James Turnbull 10 months ago
- Status changed from Unreviewed to Needs Decision
#4
Updated by eric sorenson 9 months ago
- Target version changed from 2.7.x to 3.0.0
- Keywords set to errors
That is a pretty rough error message. It’d be good for the 3.0 agent to be aware of the earlier servers and error out specifically.
In general, we want to add content negotiation to agent-master communication in 3.x ; I’m relating this to #6879 which I believe is the best place to track the solution.
#5
Updated by eric sorenson 9 months ago
To be clear though, implementing #6879 should not block investigating and doing what we can in 3.0.0 for this message specifically.
#6
Updated by Daniel Pittman 9 months ago
eric sorenson wrote:
That is a pretty rough error message. It’d be good for the 3.0 agent to be aware of the earlier servers and error out specifically.
In general, we want to add content negotiation to agent-master communication in 3.x ; I’m relating this to #6879 which I believe is the best place to track the solution.
There are two paths to fixing this:
One is to change the way that classes signal their capability for transforming into PSON / JSON, and then make 2.7.x return an appropriate error instead of success, and the meaningless instance.inspect string as JSON.
This fixes the problem cleanly, but doesn’t resolve it until 2.7 users upgrade.
The alternative is to have the client side PSON format detect this degenerate situation and handle it as a special sort of failure. That requires special-case logic in the decoder to handle this specific failure mode.
Which is preferable? Note, also, that this isn’t so much a failure of negotiation, as a failure of the 2.7.x master: because PSON infects every object with the ability to turn into PSON (but uselessly), the format handler can’t actually tell if something should, or should not, emit JSON.
#7
Updated by eric sorenson 9 months ago
- Target version changed from 3.0.0 to 3.x
This would be good to have but I’m not going to block the 3.0.0 release on it; we have been clear & consistent about the “upgrade master first” strategy. Maaaaybe a FAQ item if the error is always the same.
#8
Updated by eric sorenson 9 months ago
Daniel thank you for investigating the avenues to fix it — on one hand it seems to me like the defensive change should reside on the client as that is what’s newer and therefore it’s the end which has “caused” the problem; but on the other hand the server should generally avoid sending garbage and instead emit appropriate HTTP-esque errors.
#9
Updated by eric sorenson 8 months ago
- Parent task set to #17017
#10
Updated by eric sorenson 8 months ago
- Parent task deleted (
#17017)
#11
Updated by Lee Lowder 8 months ago
Saw this brought up in IRC recently, so thought I’d add a few comments. I’ve got a 2.7.19 master and inadvertently wound up with a couple of 3.0.0 nodes.
I get a similar message when these nodes run, but as a warning.
The full output is available at https://gist.github.com/3996305 but the key parts are:
Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Could not intern from pson: source '"#<Puppet::Node:0x7f' not in PSON!
#12
Updated by Andrew Parker 8 months ago
- Status changed from Needs Decision to Closed
#13
Updated by Andrew Parker 8 months ago
- Assignee deleted (
eric sorenson) - Target version deleted (
3.x)