#132 Fix mirrorlist proxies for iad2
Closed 3 years ago by adrian. Opened 3 years ago by adrian.
fedora-infra/ adrian/ansible master  into  master

@@ -88,7 +88,7 @@ 

    file: dest="{{item}}" owner=mirrormanager group=mirrormanager mode=0755 state=touch

    with_items:

    - /var/log/mirrormanager/mirrorlist3.service.log

-   when: datacenter == 'phx2'

+   when: datacenter == 'iad2'

    tags:

    - mirrorlist_proxy

  
@@ -96,7 +96,7 @@ 

    file: dest="{{item}}" owner=mirrormanager group=mirrormanager

    with_items:

    - /var/log/mirrormanager/mirrorlist3.service.log

-   when: datacenter == 'phx2'

+   when: datacenter == 'iad2'

    tags:

    - mirrorlist_proxy

  
@@ -155,7 +155,7 @@ 

    - mirrorlist_proxy

    notify:

    - reload systemd

-   when: datacenter == 'phx2'

+   when: datacenter == 'iad2'

  

  # enable both of them to run on boot

  - name: Enable mirrorlist1
@@ -172,7 +172,7 @@ 

    service: name=mirrorlist3 enabled=yes

    tags:

    - mirrorlist_proxy

-   when: datacenter == 'phx2'

+   when: datacenter == 'iad2'

  

  # install our cron script to handle hourly new protbuf cache changes.

  - name: install script to restart mirrorlist containers on protobuf cache changes

@@ -10,7 +10,7 @@ 

  ## Docker ports for mirrors

  mirrorlist1="http://localhost:18081/metalink?repo=rawhide&arch=x86_64"

  mirrorlist2="http://localhost:18082/metalink?repo=rawhide&arch=x86_64"

- {% if datacenter == 'phx2' %}

+ {% if datacenter == 'iad2' %}

  mirrorlist3="http://localhost:18083/metalink?repo=rawhide&arch=x86_64"

  {% endif %}

  
@@ -27,7 +27,7 @@ 

  	cp /srv/mirrorlist/data/mirrorlist1/* /srv/mirrorlist/data/mirrorlist2/

  fi

  

- {% if datacenter == 'phx2' %}

+ {% if datacenter == 'iad2' %}

  # We have more mirror containers here

  if [ ! -f /srv/mirrorlist/data/mirrorlist3/global_netblocks.txt ];

  then
@@ -58,7 +58,7 @@ 

  	exit 1

  fi

  

- {% if datacenter == 'phx2' %}

+ {% if datacenter == 'iad2' %}

  # check mirrorlist3 (old protbuf cache and see that it's processing ok)

  curl -q -H mirrors.fedoraproject.org ${mirrorlist3} -s -f --retry 50 --retry-delay 10 --retry-connrefused --retry-max-time 180 | grep "sha512" >/dev/null

  if [ $? != 0 ]; then
@@ -131,7 +131,7 @@ 

  

  echo "enable server mirror-lists-backend/mirrorlist-local2" | nc -U /var/run/haproxy-admin >& /dev/null

  

- {% if datacenter == 'phx2' %}

+ {% if datacenter == 'iad2' %}

  # copy new protbuf cache to mirrorlist3

  cp -a /srv/mirrorlist/data/mirrorlist1/* /srv/mirrorlist/data/mirrorlist3/

  

There were a couple of phx2 conditionals in the mirrorlist related
files. This actually fixes reloading the mirrorlist servers on certain
iad2 proxies which have three copies running. The third copy is serving
really old data because it has never been reloaded.

Pull-Request has been closed by adrian

3 years ago