Closed PierreR closed 8 years ago
Can you reproduce the queries with curl and share that information?
The error occurs at the facts level (first level facts:
yaml key).
Here are more information that could be helpful:
pdbquery dumpfacts
output looks pretty ok too selinux: 'false'
is_pe: 'false'
blockdevice_sda_model: Virtual disk
typ
The file has 49137
of size and stop at line 1190
(just 10 nodes)
Could it be a memory/lazy loading problem while writing the file ?
Do you think it is really useful to see the curl
for the node that fails (curl 'http://puppetdb.sandbox.srv.cirb.lan:8080/v3/nodes/jenkinsmaster.sandbox.srv.cirb.lan/facts/) ?
The output is misleading as it probably fails after what is actually written (due to buffering). The actual response from the web server would indeed be useful to debug this ...
This is my public key https://pgp.mit.edu/pks/lookup?op=get&search=0x960CAA9B835FAF50 in case you'd like to share the facts.
facts.zip Here are three encrypted files:
(curl 'http://puppetdb.sandbox.srv.cirb.lan:8080/v3/nodes/jenkinsmaster.sandbox.srv.cirb.lan/facts/
pdbquery dumpfacts
There should be no secret in these files but it is always nice to play a bit with gpg
;-)
jenkinsmaster.curlfacts
doesn't look like a list of facts, but like a list of resources
You're right. This should be right: jenkinsmaster-curlfacts.zip
I don't understand why I have certname
for every key in there but well ...
because you can query facts for more than one host
This is weird, this is properly read by language puppet, and all facts have string values. What happens if you try the snapshot
command with a new puppetdb file ?
If it works it means it can't read the testdb file, which either means something changed between versions or that the deserialization code isn't right.
The first time (deleting testdb.yaml
) I have got this error:
~ → pdbquery -l puppetdb.sandbox.srv.cirb.lan:8080 -t remote snapshot ~/testdb.yaml
pdbquery: InvalidTextualPosition "null" 0 (-1)
The produced file is obviously wrong (this is the file I sent with the archive). So the second time it fails with:
# second time
~ → pdbquery -l puppetdb.sandbox.srv.cirb.lan:8080 -t remote snapshot ~/testdb.yaml
pdbquery: puppetdb load Could not parse /home/pierre/testdb.yaml: could not find expected ':' while scanning a simple key at line 1193, column 0
I should have checked earlier, but InvalidTextualPosition is a megaparsec error. This isn't a YAML/JSON problem !
Does the thing I just pushed help ?
Nope. It doesn't seem to make any difference.
This has something to do with newPos
being used with line or column numbers less than 1.
There was a brainfart in the previous fix. Must be much better now.
Great it works ! Thanks.
I have just committed 8c4448168bb9 to fix a parsing problem with the
snapshot
command. I have now this error:I do have a file
testdb.yaml
that looks correct but it stops atI don't know why for this specific node I have got this error. Any idea ?