swarm_cluster_cli_ope 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb55538ef01dfe147ffa9fae04ff38d63e68af9a1faa85ced4775a3bacd82644
4
- data.tar.gz: 115cc147db39a35fcd2f34aa4f8389ca538dd09e271e7f8c687bb7d96e964f64
3
+ metadata.gz: ec7a0b3dd9f3253a1e18bcb091b4e31a5de19b6304a91fe77ed4d704c9a9f109
4
+ data.tar.gz: b552969314967d155c2ddba35de7f4f809b5905830c1fb2edc20a0542879005f
5
5
  SHA512:
6
- metadata.gz: 0d2c8ae9c0ab3209d8cbd4e44a3635509aa9d6b0a2a35f449a87a4f6beee3403f6a6d80f394af9375ec0904d8f9f0841b1390538b79288153553cf914373ae49
7
- data.tar.gz: 9ae569814dc2299265a3d4833aac1f0e62251b8d195a94ea308fafeec6d1ba07401faeebcf9f55a7015dff07d601e768ae4d6722b3c4e0ee811d3d978375e37c
6
+ metadata.gz: 64f80000c7b36cd5ef521f41939fb93060b3e94520081b33522d44ecf52cba7754022881089a981a206b230287289e19735efd9b6fdcb1acdb60e26563c2f14a
7
+ data.tar.gz: e7943eaad259b10bc0e3c6879aca2910d6a864e843d0235844eca2ef90c10c8ba7fa671b1fa2bbcbdec5041a0946abae4d96b6a49d311636f8a52dd5717a7a7a
@@ -1,5 +1,8 @@
1
1
  ## Changelog
2
2
 
3
+ # 0.5.4
4
+ - bug permessi sul file password dell'rsync
5
+
3
6
  # 0.5.3
4
7
  - bug selezione pod, ora filtra solamente per i containers che sono attivi
5
8
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- swarm_cluster_cli_ope (0.5.3)
4
+ swarm_cluster_cli_ope (0.5.4)
5
5
  activesupport
6
6
  open4
7
7
  thor (~> 1.0)
@@ -50,9 +50,9 @@ module SwarmClusterCliOpe
50
50
  if cmd.failed?
51
51
  puts "Problemi nell'installazione di rsync nel pod"
52
52
  else
53
- cmd = container.cp_in(File.expand_path("../../rsync_cfgs/rsyncd.conf", __FILE__), "/tmp/.")
53
+ cmd = container.cp_in(configs_path("rsyncd.conf"), "/tmp/.")
54
54
  copy_1 = cmd.execute.failed?
55
- cmd = container.cp_in(File.expand_path("../../rsync_cfgs/rsyncd.secrets", __FILE__), "/tmp/.")
55
+ cmd = container.cp_in(configs_path("rsyncd.secrets"), "/tmp/.")
56
56
  copy_2 = cmd.execute.failed?
57
57
  cmd = container.exec(['bash -c "chmod 600 /tmp/rsyncd.secrets && chown root /tmp/*"'])
58
58
  chmod = cmd.failed?
@@ -76,11 +76,15 @@ module SwarmClusterCliOpe
76
76
 
77
77
  sleep 1
78
78
 
79
+ # forzo i permessi sul file della password
80
+ cmd = ShellCommandExecution.new(["chmod 600 #{ configs_path("password")}"])
81
+ cmd.execute
82
+
79
83
  # lanciamo il comando quindi per far rsync
80
84
  rsync_command = [
81
85
  "rsync -az --no-o --no-g",
82
86
  "--delete",
83
- "--password-file=#{ File.expand_path("../../rsync_cfgs/password", __FILE__)}"
87
+ "--password-file=#{ configs_path("password")}"
84
88
  ]
85
89
 
86
90
  if direction == :up
@@ -119,6 +123,14 @@ module SwarmClusterCliOpe
119
123
 
120
124
  end
121
125
 
126
+ ##
127
+ # Estrapola la path al file di configurazione
128
+ # @param [String] file
129
+ # @return [String]
130
+ def configs_path(file)
131
+ File.expand_path("../../rsync_cfgs/#{file}", __FILE__)
132
+ end
133
+
122
134
  end
123
135
  end
124
136
  end
@@ -1,3 +1,3 @@
1
1
  module SwarmClusterCliOpe
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swarm_cluster_cli_ope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marino Bonetti