Projects
home:rottame:vhosts-ng
rubygem-nginx-controller
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 10
View file
rubygem-nginx-controller.changes
Added
@@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Aug 16 07:03:49 UTC 2023 - Angelo Grossini <rottame@intercom.it> + +- remove services first
View file
rubygem-nginx-controller.spec
Changed
@@ -1,7 +1,7 @@ %define mod_name nginx-controller %define mod_full_name %{mod_name}-%{version} Name: rubygem-nginx-controller -Version: 2.0.2 +Version: 2.0.3 Release: 0 Summary: vhng nginx controller License: Apache-2.0
View file
nginx-controller-2.0.2.gem/checksums.yaml.gz -> nginx-controller-2.0.3.gem/checksums.yaml.gz
Changed
@@ -1,7 +1,7 @@ --- SHA256: - metadata.gz: ff5f81ff56dc7fb0d26f14fa47721b3bba9770951f338e6b7314a095992bafb7 - data.tar.gz: e94fe938e91f6c6262f8cda2b0009b2a78bb530bcf9058fffcf9770756449f49 + metadata.gz: ff56f6d1e1762e3cd4314fef9334aee88c8118209452d4d9c819ff038732774e + data.tar.gz: af6a3bbe7e24695f845f1a9e3d409e2df1804ce60946abd1e5dcd47b7382c678 SHA512: - metadata.gz: 630894268a1498e55f5f74ee97e26c3e2b0395997e5a7a4a106438e3dc692d77aee789371dfa8c4d5d1a82d134df5f35f68e750022d7ab42993cba4c1e975cc6 - data.tar.gz: 6c0deb9a80ce4b84e625ac4c97729ccbde6a6918abfe3f438b683346dcf7865c6e34f86fed9f479f26b00161b833032330205a7bbc6a02b4bf096a02ada2e7f2 + metadata.gz: 8b7238aa9df28ac214a9ff78970f58706e46b725db6ccaaef7eeab4a5e49ca19975e229df3a4ba17beccba935fcd9a84a2226879b1faf4ca24cbc97930e076e1 + data.tar.gz: d87cd11dc7423f5820d8c09ac4f73b30642bba052a3b885306c27b0cde1becdd1b4c13a73916084bed5e3f9e324d8f97f98a533d23aa19706fc081ac31aabac9
View file
nginx-controller-2.0.2.gem/data/lib/nginx_controller.rb -> nginx-controller-2.0.3.gem/data/lib/nginx_controller.rb
Changed
@@ -35,7 +35,7 @@ Docker::Listener.run do | _ | update_services_status end - + # when a service changes from starting to running, no event is raised # add all new services to a watchlist and poll docker until they are running or until a 120s timeout is reached EventMachine::PeriodicTimer.new(5) do @@ -43,11 +43,11 @@ update_services_status end end - + EventMachine::PeriodicTimer.new(5) do process_letsencrypt_queue end - + every_day_at_midnight do check_letsencrypt_status end @@ -76,7 +76,7 @@ services_ps do | services | puts '-> Check expiring certificates' services.each do | svc | - le_queue_add(svc) if svc.letsencrypt_expiring? + le_queue_add(svc) if svc.letsencrypt_expiring? STDOUT.flush end STDOUT.flush @@ -106,6 +106,19 @@ cleanup = errors = + removed.each do | svc | + puts "Deleted service #{svc.name}" + begin + svc.deconfigure! + rescue + puts "Cannot deactivate service #{svc.name}: #{$!}" + puts "\t" + $!.backtrace0..10.join("\n\t") + errors << $! + ensure + watchlist_remove(svc) + end + end + added.each do | svc | puts "New service #{svc.name}" begin @@ -125,31 +138,18 @@ begin pair1.reconfigure! if pair1.settled? - watchlist_remove(pair1) + watchlist_remove(pair1) else watchlist_add(pair1) end rescue - watchlist_remove(pair1) + watchlist_remove(pair1) puts "Cannot activate service #{pair1.name}: #{$!}" puts "\t" + $!.backtrace0..10.join("\n\t") errors << $! end end - removed.each do | svc | - puts "Deleted service #{svc.name}" - begin - svc.deconfigure! - rescue - puts "Cannot deactivate service #{svc.name}: #{$!}" - puts "\t" + $!.backtrace0..10.join("\n\t") - errors << $! - ensure - watchlist_remove(svc) - end - end - cleanup = cleanup_config_files(services) if added.any? || changed.any? || removed.any? || cleanup.any? @@ -188,7 +188,7 @@ services.unshift MasterService.new services.sort! - + block.call services end end @@ -229,7 +229,7 @@ configs = active_services.map(&:config_filename) leftovers = Dir'/etc/nginx/vhosts.d/*.conf'.inject() do | memo, cfg | unless cfg.in?(configs) - memo << cfg + memo << cfg puts "Cleanup old config file #{cfg}" FileUtils.rm_f(cfg) end @@ -260,7 +260,7 @@ def le_queue_add(svc) unless @le_queuesvc.id puts "Service #{svc.name} should update letsencrypt" - @le_queuesvc.id = svc + @le_queuesvc.id = svc end end @@ -272,7 +272,7 @@ @reloadsvc.id = svc watchlist_add(svc) end - + def print_diff(diff) str = diff.map do | k, d | if k == :labels @@ -293,6 +293,6 @@ every_day_at_midnight(&block) end end - + end end
View file
nginx-controller-2.0.2.gem/metadata.gz -> nginx-controller-2.0.3.gem/metadata.gz
Changed
@@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: nginx-controller version: !ruby/object:Gem::Version - version: 2.0.2 + version: 2.0.3 platform: ruby authors: - Angelo Grossini -autorequire: +autorequire: bindir: bin cert_chain: -date: 2023-03-02 00:00:00.000000000 Z +date: 2023-08-16 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: eventmachine @@ -111,7 +111,7 @@ - MIT metadata: source_code_uri: https://lab.intercom.it -post_install_message: +post_install_message: rdoc_options: require_paths: - lib @@ -126,8 +126,8 @@ - !ruby/object:Gem::Version version: '0' requirements: -rubygems_version: 3.3.5 -signing_key: +rubygems_version: 3.3.15 +signing_key: specification_version: 4 summary: Nginx controller for vhosts-ng test_files:
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.