diff --git a/cmd/sync/main.go b/cmd/sync/main.go index 287bb469..4617aaf3 100644 --- a/cmd/sync/main.go +++ b/cmd/sync/main.go @@ -20,7 +20,7 @@ import ( var configFile = flag.String("config_path", "/etc/nginx/aws.yaml", "Path to the config file") var logFile = flag.String("log_path", "", "Path to the log file. If the file doesn't exist, it will be created") -var version = "0.1-1" +var version = "0.1-2" const connTimeoutInSecs = 10 diff --git a/cmd/sync/nginx.go b/cmd/sync/nginx.go index 4d542c0f..822737fb 100644 --- a/cmd/sync/nginx.go +++ b/cmd/sync/nginx.go @@ -118,8 +118,8 @@ func checkIfUpstreamConfIsAccessible(httpClient *http.Client, endpoint string) e return fmt.Errorf("upstream_conf endpoint %v is not accessible: %v", endpoint, err) } - if resp.StatusCode != http.StatusNotFound { - return fmt.Errorf("upstream_conf endpoint %v is not accessible: expected 404 response, got %v", endpoint, resp.StatusCode) + if resp.StatusCode != http.StatusNotFound && resp.StatusCode != http.StatusBadRequest { + return fmt.Errorf("upstream_conf endpoint %v is not accessible: expected 404 or 400 response, got %v", endpoint, resp.StatusCode) } bodyStr := string(body) diff --git a/os-packages/debian/changelog b/os-packages/debian/changelog index ac7704a6..49bb53ec 100644 --- a/os-packages/debian/changelog +++ b/os-packages/debian/changelog @@ -1,3 +1,10 @@ +nginx-asg-sync (0.1-2-%%CODENAME%%) unstable; urgency=low + + * 0.1-2 + * Make sure nginx-asg-sync works with NGINX Plus R13 + + -- Michael Pleshakov Wed, 30 Aug 2017 21:03:28 +0000 + nginx-asg-sync (0.1-1-%%CODENAME%%) unstable; urgency=low * 0.1-1 diff --git a/os-packages/rpm/SPECS/nginx-asg-sync.spec b/os-packages/rpm/SPECS/nginx-asg-sync.spec index e144938a..db4cc8bf 100644 --- a/os-packages/rpm/SPECS/nginx-asg-sync.spec +++ b/os-packages/rpm/SPECS/nginx-asg-sync.spec @@ -4,7 +4,7 @@ Summary: NGINX Plus integration with AWS Auto Scaling groups Name: nginx-asg-sync Version: 0.1 -Release: 1%{?dist} +Release: 2%{?dist} Vendor: Nginx Software, Inc. URL: https://github.com/nginxinc/nginx-asg-sync Packager: Nginx Software, Inc. @@ -110,6 +110,10 @@ if [ $1 -ge 1 ]; then fi %changelog +* Wed Aug 30 2017 Michael Pleshakov +- 0.1-2 +- Make sure nginx-asg-sync works with NGINX Plus R13 + * Fri Mar 03 2017 Michael Pleshakov - 0.1-1 - First release