puppetdb_query 0.0.37 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/puppetdb_query/mongodb.rb +4 -3
- data/lib/puppetdb_query/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1233bb590c15edcf038457d14a231dbf77365561
|
4
|
+
data.tar.gz: b411c91cb9601a75d07c52f4238b72e7433a82fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 660cd1f16c7716bf4d03fc4c7a4b8d462c7006984bb87dd9d7bef21a8e4ec3255b53801e49fb0a01705151a4d6fc15d8b75282a9820a8d0b3eeb90953bd4ae42
|
7
|
+
data.tar.gz: 5f8b2d5a8b7001e2292fce1d5ebfde5ac3690a82c6852ee7196281dafcb2eb21aafed547642c0942af2906589ff3d7cfd6ca22206585ad3957130d9784600eb5
|
@@ -176,10 +176,11 @@ module PuppetDBQuery
|
|
176
176
|
# The dotted field .. in .. is not valid for storage. (57)
|
177
177
|
# .. is an illegal key in MongoDB. Keys may not start with '$' or contain a '.'. (BSON::String::IllegalKey)
|
178
178
|
raise e unless (e.message =~ /The dotted field / || e.message =~ /is an illegal key/)
|
179
|
-
logger.warn " we try again deleting and inserting the node"
|
179
|
+
# logger.warn " we try again deleting and inserting the node"
|
180
|
+
logger.warn " we try again update the node"
|
180
181
|
begin
|
181
|
-
connection[nodes_collection].find(_id: node).delete_one
|
182
|
-
connection[nodes_collection].
|
182
|
+
# connection[nodes_collection].find(_id: node).delete_one
|
183
|
+
connection[nodes_collection].update_one(facts.merge(_id: node), upsert: true,
|
183
184
|
bypass_document_validation: true, check_keys: false, validating_keys: false)
|
184
185
|
rescue
|
185
186
|
logger.error " updating #{node} failed with: #{e.message}"
|