petasos 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/petasos/distributor.rb +4 -3
- data/lib/petasos/location.rb +6 -6
- data/lib/petasos/node.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb623c372e4177df95553923e61d111337bb01b28ace724d443d2a2014631ad2
|
4
|
+
data.tar.gz: b914c31bbd9c6743f662c051b881ca9e9195542e5ec6b7b1c8890b33496470a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8882b063964e50f3c3e6109d652eedac094c619007d173760ccc769c2452b86ab875b1355c5434d431e20a1e634624dd642207484f76d1c13de6bcc96ceaa03d
|
7
|
+
data.tar.gz: 5e545b2c1fbe779f1effa4641fe3fa93b5f46aa60611bacaae6e24d9b57a5809fe5bac79c17ab5f996dfa80a62dfe2258b6289faa3ba9a817653b81f43e1adfd
|
data/lib/petasos/distributor.rb
CHANGED
@@ -112,6 +112,7 @@ class Petasos::Distributor
|
|
112
112
|
|
113
113
|
# Process the backfills.
|
114
114
|
@pools.each_pair do |pool_name, manifest_hash|
|
115
|
+
`mkdir -p petasos_distributor_workspace`
|
115
116
|
# for each canonical exporter loop through the backfill lists, identify files that need moving and move them
|
116
117
|
manifest_hash["canonical_exporters"].each do |canonical_exporter_details|
|
117
118
|
exporter_seen_files = get_seen_file_hash(canonical_exporter_details.first, canonical_exporter_details.last, pool_name)
|
@@ -134,15 +135,15 @@ class Petasos::Distributor
|
|
134
135
|
end
|
135
136
|
end
|
136
137
|
# clear the seen files locally.
|
137
|
-
`rm
|
138
|
+
`rm petasos_distributor_workspace/*`
|
138
139
|
end
|
139
140
|
|
140
141
|
def get_seen_file_hash(node_name, location_name, pool_name)
|
141
142
|
find_node(node_name).grab_seen_file_for_location(location_name, pool_name)
|
142
143
|
seen_file_hash = {}
|
143
144
|
# some locations/pools do not generate a seen file.
|
144
|
-
if File.file?("seen_#{location_name}_#{pool_name}.yaml")
|
145
|
-
seen_file_list = YAML.load_file("seen_#{location_name}_#{pool_name}.yaml")
|
145
|
+
if File.file?("petasos_distributor_workspace/seen_#{location_name}_#{pool_name}.yaml")
|
146
|
+
seen_file_list = YAML.load_file("petasos_distributor_workspace/seen_#{location_name}_#{pool_name}.yaml")
|
146
147
|
else
|
147
148
|
seen_file_list = []
|
148
149
|
end
|
data/lib/petasos/location.rb
CHANGED
@@ -144,12 +144,12 @@ class Petasos::Location
|
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
|
-
def clear_all_seen_pool_files
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
end
|
147
|
+
# def clear_all_seen_pool_files
|
148
|
+
# pools.each do |pool|
|
149
|
+
# yaml_path = File.join(path, "seen_#{pool["name"]}.yaml")
|
150
|
+
# write_yaml(yaml_path, [])
|
151
|
+
# end
|
152
|
+
# end
|
153
153
|
|
154
154
|
def create_file_export_list(pool, file_paths)
|
155
155
|
yaml_path = File.join(Dir.pwd, "exports_#{@config["name"]}_#{pool["name"]}_#{Time.now.strftime("%Y-%m-%d-%H:%M:%S")}.yaml")
|
data/lib/petasos/node.rb
CHANGED
@@ -39,7 +39,7 @@ class Petasos::Node
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def grab_seen_file_for_location(location_name, pool_name)
|
42
|
-
`scp #{config["host"]}:#{config["path"]}/seen_#{location_name}_#{pool_name}.yaml
|
42
|
+
`scp #{config["host"]}:#{config["path"]}/seen_#{location_name}_#{pool_name}.yaml petasos_distributor_workspace/`
|
43
43
|
end
|
44
44
|
|
45
45
|
def parse_manifests
|