|
|
|
|
|
Actually nevermind, I've done it myself for 1.6.0 and it looks like its fixed now.
# curl -vv -G -H "Accept: application/json" 'http: "command": "replace catalog",
"version": 2,
"payload": "{
\"metadata\": {
\"api_version\": 1
},
\"data\": {
\"name\": \"puppet09.cscs.ch\",
\"version\": \"1111\",
\"edges\": [
],
\"resources\": [
{\"type\": \"Service\",
\"title\": \"iptables\",
\"exported\": false,
\"file\": \"/etc/puppet/modules/puppetdb/manifests/server.pp\",
\"line\": 121,
\"tags\": [\"node\", \"puppetdb\"],
\"parameters\": {\"hasrestart\": true,
\"ensure\" : \"running\"}
}
]
}
}"
}'
* Adding handle: conn: 0x7fbbe4003800
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fbbe4003800) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 8080 (#0)
* Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET /v2/commands?payload=%7B%0A%20%20%22command%22%3A%20%22replace%20catalog%22%2C%0A%20%20%22version%22%3A%202%2C%0A%20%20%22payload%22%3A%20%22%7B%0A%20%20%20%20%5C%22metadata%5C%22%3A%20%7B%0A%20%20%20%20%20%20%5C%22api_version%5C%22%3A%201%0A%20%20%20%20%7D%2C%0A%20%20%20%20%5C%22data%5C%22%3A%20%20%20%7B%0A%20%20%20%20%20%20%5C%22name%5C%22%3A%20%20%20%20%20%20%5C%22puppet09.cscs.ch%5C%22%2C%0A%20%20%20%20%20%20%5C%22version%5C%22%3A%20%20%20%5C%221111%5C%22%2C%0A%20%20%20%20%20%20%5C%22edges%5C%22%3A%20%20%20%20%20%5B%0A%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%5C%22resources%5C%22%3A%20%5B%0A%7B%5C%22type%5C%22%3A%20%5C%22Service%5C%22%2C%0A%20%5C%22title%5C%22%3A%20%5C%22iptables%5C%22%2C%0A%20%5C%22exported%5C%22%3A%20false%2C%0A%20%5C%22file%5C%22%3A%20%5C%22%2Fetc%2Fpuppet%2Fmodules%2Fpuppetdb%2Fmanifests%2Fserver.pp%5C%22%2C%0A%20%5C%22line%5C%22%3A%20121%2C%0A%20%5C%22tags%5C%22%3A%20%5B%5C%22node%5C%22%2C%20%5C%22puppetdb%5C%22%5D%2C%0A%20%5C%22parameters%5C%22%3A%20%7B%5C%22hasrestart%5C%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5C%22ensure%5C%22%20%3A%20%5C%22running%5C%22%7D%0A%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%7D%22%0A%7D HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:8080
> Accept: application/json
>
< HTTP/1.1 200 OK
< Date: Tue, 04 Feb 2014 15:37:51 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 53
* Server Jetty(7.6.1.v20120215) is not blacklisted
< Server: Jetty(7.6.1.v20120215)
<
{
"uuid" : "760745da-f68b-4f9d-9bcb-d3c02f821f14"
* Connection #0 to host localhost left intact
}%
And the log:
# lein clean && lein run services -c config.ini
Compiling com.puppetlabs.puppetdb.core
2014-02-04 15:37:48,983 INFO [cli.services] PuppetDB version 1.6.0
2014-02-04 15:37:49,092 INFO [cli.services] Starting broker
2014-02-04 15:37:49,094 INFO [puppetlabs.mq] Setting ActiveMQ StoreUsage limit to 1000 MB
2014-02-04 15:37:49,146 INFO [puppetlabs.mq] Setting ActiveMQ TempUsage limit to 1000 MB
2014-02-04 15:37:49,792 INFO [cli.services] Starting 4 command processor threads
2014-02-04 15:37:49,801 INFO [cli.services] Starting query server
2014-02-04 15:37:49,808 INFO [cli.services] Starting database garbage collection
2014-02-04 15:37:49,812 WARN [cli.services] Starting telnet server on port 8082
2014-02-04 15:37:49,828 INFO [cli.services] Finished database garbage collection
2014-02-04 15:37:49,834 INFO [cli.services] Starting sweep of stale nodes (threshold: 1 second)
2014-02-04 15:37:50,042 INFO [cli.services] Finished sweep of stale nodes (threshold: 1 second)
2014-02-04 15:37:50,042 INFO [cli.services] Starting sweep of stale reports (threshold: 14 days)
2014-02-04 15:37:50,048 INFO [cli.services] Finished sweep of stale reports (threshold: 14 days)
2014-02-04 15:37:50,056 INFO [puppetdb.command] [92024464-adf9-4feb-b258-584402dd613d] [deactivate node] puppet09.cscs.ch
2014-02-04 15:37:50,345 INFO [ssl.SslContextFactory] Enabled Protocols [SSLv3] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
2014-02-04 15:37:51,948 INFO [puppetdb.command] [760745da-f68b-4f9d-9bcb-d3c02f821f14] [replace catalog] puppet09.cscs.ch
And the query:
# curl 'http:{
"data" : {
"name" : "puppet09.cscs.ch",
"edges" : [ ],
"resources" : [ {
"title" : "iptables",
"parameters" : {
"ensure" : "running",
"hasrestart" : true
},
"type" : "Service",
"exported" : false,
"line" : 121,
"file" : "/etc/puppet/modules/puppetdb/manifests/server.pp",
"tags" : [ "node", "puppetdb" ]
} ],
"version" : "1111",
"transaction-uuid" : null
},
"metadata" : {
"api_version" : 1
}
}%
|
|
|
|
|
|
|
Dear puppeteers, I came across this problem, when manually inserting a fictitious catalog into PuppetDB. The following insertion works: {code} [root@puppet05 ~]# curl -vv -G -H "Accept: application/json" 'http://localhost:8080/v2/commands' --data-urlencode 'payload={ "command": "replace catalog", "version": 2, "payload": "{ \"metad...
|
|
|
--
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.
|