Page MenuHomeSoftware Heritage

swh-search: bind the service to the internal network address
ClosedPublic

Authored by vsellier on Jul 2 2021, 7:35 PM.

Details

Summary

It's necessary to allow developpers to perform some r/o tests.
Actually the service is allowing r/w but it something will work on.

Related to T3408

Test Plan
  • search0.staging
diff origin/production/search0.internal.staging.swh.network current/search0.internal.staging.swh.network
*******************************************
  Concat::Fragment[nginx-swh-search-default-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 0.0.0.0:5010 default_server;
      +  listen search0.internal.staging.swh.network:5010 default_server;
      _
      _
*******************************************
  Concat::Fragment[nginx-swh-search-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 0.0.0.0:5010 deferred;
      +  listen search0.internal.staging.swh.network:5010 deferred;
      _
      _
*******************************************
  Concat_fragment[nginx-swh-search-default-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 0.0.0.0:5010 default_server;
      +  listen search0.internal.staging.swh.network:5010 default_server;
      _
      _
*******************************************
  Concat_fragment[nginx-swh-search-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 0.0.0.0:5010 deferred;
      +  listen search0.internal.staging.swh.network:5010 deferred;
      _
      _
*******************************************
  Nginx::Resource::Server[nginx-swh-search-default] =>
   parameters =>
     listen_ip =>
      - 0.0.0.0
      + search0.internal.staging.swh.network
*******************************************
  Nginx::Resource::Server[nginx-swh-search] =>
   parameters =>
     listen_ip =>
      - 0.0.0.0
      + search0.internal.staging.swh.network
*******************************************
*** End octocatalog-diff on search0.internal.staging.swh.network
  • moma
diff origin/production/moma.softwareheritage.org current/moma.softwareheritage.org
*******************************************
  Concat::Fragment[nginx-swh-search-default-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 127.0.0.1:5010 default_server;
      +  listen moma.internal.softwareheritage.org:5010 default_server;
      _
      _
*******************************************
  Concat::Fragment[nginx-swh-search-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 127.0.0.1:5010 deferred;
      +  listen moma.internal.softwareheritage.org:5010 deferred;
      _
      _
*******************************************
  Concat_fragment[nginx-swh-search-default-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 127.0.0.1:5010 default_server;
      +  listen moma.internal.softwareheritage.org:5010 default_server;
      _
      _
*******************************************
  Concat_fragment[nginx-swh-search-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 127.0.0.1:5010 deferred;
      +  listen moma.internal.softwareheritage.org:5010 deferred;
      _
      _
*******************************************
  File[/etc/softwareheritage/web/web.yml] =>
   parameters =>
     content =>
      @@ -2,5 +2,5 @@
       search:
         cls: remote
      -  url: http://localhost:5010/
      +  url: http://moma.internal.softwareheritage.org:5010/
       metadata_search_backend: swh-indexer-storage
       storage:
*******************************************
  Nginx::Resource::Server[nginx-swh-search-default] =>
   parameters =>
     listen_ip =>
      - 127.0.0.1
      + moma.internal.softwareheritage.org
*******************************************
  Nginx::Resource::Server[nginx-swh-search] =>
   parameters =>
     listen_ip =>
      - 127.0.0.1
      + moma.internal.softwareheritage.org
*******************************************
*** End octocatalog-diff on moma.softwareheritage.org
  • webapp1
diff origin/production/webapp1.internal.softwareheritage.org current/webapp1.internal.softwareheritage.org
*******************************************
  Concat::Fragment[nginx-swh-search-default-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 127.0.0.1:5010 default_server;
      +  listen webapp1.internal.softwareheritage.org:5010 default_server;
      _
      _
*******************************************
  Concat::Fragment[nginx-swh-search-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 127.0.0.1:5010 deferred;
      +  listen webapp1.internal.softwareheritage.org:5010 deferred;
      _
      _
*******************************************
  Concat_fragment[nginx-swh-search-default-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 127.0.0.1:5010 default_server;
      +  listen webapp1.internal.softwareheritage.org:5010 default_server;
      _
      _
*******************************************
  Concat_fragment[nginx-swh-search-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 127.0.0.1:5010 deferred;
      +  listen webapp1.internal.softwareheritage.org:5010 deferred;
      _
      _
*******************************************
  File[/etc/softwareheritage/web/web.yml] =>
   parameters =>
     content =>
      @@ -2,5 +2,5 @@
       search:
         cls: remote
      -  url: http://localhost:5010/
      +  url: http://webapp1.internal.softwareheritage.org:5010/
       metadata_search_backend: swh-search
       storage:
*******************************************
  Nginx::Resource::Server[nginx-swh-search-default] =>
   parameters =>
     listen_ip =>
      - 127.0.0.1
      + webapp1.internal.softwareheritage.org
*******************************************
  Nginx::Resource::Server[nginx-swh-search] =>
   parameters =>
     listen_ip =>
      - 127.0.0.1
      + webapp1.internal.softwareheritage.org
*******************************************
*** End octocatalog-diff on webapp1.internal.softwareheritage.org
  • search1:
diff origin/production/search1.internal.softwareheritage.org current/search1.internal.softwareheritage.org
*******************************************
  Concat::Fragment[nginx-swh-search-default-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 0.0.0.0:5010 default_server;
      +  listen search1.internal.softwareheritage.org:5010 default_server;
      _
      _
*******************************************
  Concat::Fragment[nginx-swh-search-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 0.0.0.0:5010 deferred;
      +  listen search1.internal.softwareheritage.org:5010 deferred;
      _
      _
*******************************************
  Concat_fragment[nginx-swh-search-default-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 0.0.0.0:5010 default_server;
      +  listen search1.internal.softwareheritage.org:5010 default_server;
      _
      _
*******************************************
  Concat_fragment[nginx-swh-search-header] =>
   parameters =>
     content =>
      @@ -1,5 +1,5 @@
       # MANAGED BY PUPPET
       server {
      -  listen 0.0.0.0:5010 deferred;
      +  listen search1.internal.softwareheritage.org:5010 deferred;
      _
      _
*******************************************
  Nginx::Resource::Server[nginx-swh-search-default] =>
   parameters =>
     listen_ip =>
      - 0.0.0.0
      + search1.internal.softwareheritage.org
*******************************************
  Nginx::Resource::Server[nginx-swh-search] =>
   parameters =>
     listen_ip =>
      - 0.0.0.0
      + search1.internal.softwareheritage.org
*******************************************
*** End octocatalog-diff on search1.internal.softwareheritage.org

Diff Detail

Repository
rSPSITE puppet-swh-site
Branch
staging
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22463
Build 34990: arc lint + arc unit

Event Timeline

vsellier created this revision.
ardumont added a subscriber: ardumont.

There is a suspicious state in the diff on moma and webapp1 which resets the search instance configuration entry.
Can you please check?

This revision now requires changes to proceed.Jul 5 2021, 10:28 AM

Good catch. A variable renaming was missing.

vsellier edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Jul 5 2021, 4:46 PM