User Tools

Site Tools


production:shaman.ceph.com

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
production:shaman.ceph.com [2019/10/09 15:24]
djgalloway
production:shaman.ceph.com [2022/10/06 02:58]
dmick [Summary]
Line 4: Line 4:
  
 There are three VMs in the [[https://​wiki.sepia.ceph.com/​doku.php?​id=services:​ovh#​production_services|OVH CI region]] that make up shaman. There are three VMs in the [[https://​wiki.sepia.ceph.com/​doku.php?​id=services:​ovh#​production_services|OVH CI region]] that make up shaman.
-  * shaman.ceph.com is just a load balancing VM+  * shaman.ceph.com is just a load balancing VM.  Accesses are proxied to either 1.shaman.ceph.com or 2.shaman.ceph.com with an '​upstream shaman'​ clause in /​etc/​nginx/​nginx.conf,​ which is then referred to by the site config for shaman.ceph.com.
   * 1.shaman.ceph.com is the primary shaman node that has the postgres DB with all the repo information   * 1.shaman.ceph.com is the primary shaman node that has the postgres DB with all the repo information
   * 2.shaman.ceph.com is a **READ ONLY** backup in the event 1.shaman.ceph.com goes down   * 2.shaman.ceph.com is a **READ ONLY** backup in the event 1.shaman.ceph.com goes down
Line 64: Line 64:
  
     ovh_builds = {}     ovh_builds = {}
-    ​lab_builds ​= {}+    ​irvingi_builds ​= {} 
 +    braggi_builds = {} 
 +    adami_builds = {}    ​
     rest_of_the_world = {}     rest_of_the_world = {}
     ovh_count = 0     ovh_count = 0
-    ​lab_count ​= 0+    ​irvingi_count = 0 
 +    braggi_count = 0 
 +    adami_count ​= 0
  
     for build in builds:     for build in builds:
Line 75: Line 79:
             counter = ovh_count             counter = ovh_count
         elif '​slave-'​ in node_name:         elif '​slave-'​ in node_name:
-            mapping = lab_builds +            mapping = irvingi_builds 
-            counter = lab_count+            counter = irvingi_count 
 +        elif '​braggi'​ in node_name:​ 
 +            mapping = braggi_builds 
 +            counter = braggi_count 
 +        elif '​adami'​ in node_name:​ 
 +            mapping = adami_builds 
 +            counter = adami_count
         else:         else:
             mapping = rest_of_the_world             mapping = rest_of_the_world
Line 85: Line 95:
             mapping[node_name] = 1             mapping[node_name] = 1
     ​     ​
-    for mapping in [ovh_builds, ​lab_builds]:+    for mapping in [ovh_builds, ​irvingi_builds,​ braggi_builds,​ adami_builds]:
         count = 0         count = 0
         for key, value in mapping.items():​         for key, value in mapping.items():​
Line 94: Line 104:
         print         print
 </​code>​ </​code>​
-  - ''​%%pecan shell --shell ipython prod.py%%''​+  - ''​%%/​opt/​shaman/​bin/​pecan shell --shell ipython prod.py%%''​
   - Then<​code>​   - Then<​code>​
 In [1]: from shaman import models In [1]: from shaman import models
Line 103: Line 113:
  
 In [4]: two_week_stats.report() In [4]: two_week_stats.report()
 +</​code>​
 +
 +==== Delete builds/​repos from database ====
 +HYPOTHETICALLY ;-) if a repo/build got pushed to shaman that contains an embargoed security fix, you can delete the entries from shaman'​s DB.  The packages will still be on chacra servers but shaman won't know about them.  You can always [[production:​chacra.ceph.com#​manually_delete_a_repo_from_postgres_db|delete]] them from chacra too if necessary.
 +
 +<​code>​
 +ssh 1.shaman.ceph.com
 +sudo su - postgres
 +
 +postgres@1:​~$ psql -d shaman
 +psql (9.5.23)
 +Type "​help"​ for help.
 +
 +shaman=# \dt
 +             List of relations
 + ​Schema |      Name       | Type  | Owner  ​
 +--------+-----------------+-------+--------
 + ​public | alembic_version | table | shaman
 + ​public | archs           | table | shaman
 + ​public | builds ​         | table | shaman
 + ​public | nodes           | table | shaman
 + ​public | projects ​       | table | shaman
 + ​public | repos           | table | shaman
 +(6 rows)
 +
 +shaman=# delete from public.builds where sha1 = '​f73b19678311b996984c30e7c0eb96a22ffa29ce';​
 +DELETE 6
 +
 +shaman=# select id from public.repos where sha1 = '​f73b19678311b996984c30e7c0eb96a22ffa29ce';​
 +   ​id ​  
 +--------
 + ​197001
 + ​197010
 + ​197011
 + ​197012
 + ​197030
 + ​196999
 +
 +shaman=# delete from public.archs where repo_id = '​197001';​
 +DELETE 1
 +shaman=# delete from public.archs where repo_id = '​197010';​
 +DELETE 2
 +shaman=# delete from public.archs where repo_id = '​197011';​
 +DELETE 2
 +shaman=# delete from public.archs where repo_id = '​197012';​
 +DELETE 2
 +shaman=# delete from public.archs where repo_id = '​197030';​
 +DELETE 2
 +shaman=# delete from public.archs where repo_id = '​196999';​
 +DELETE 1
 +shaman=# delete from public.repos where sha1 = '​f73b19678311b996984c30e7c0eb96a22ffa29ce';​
 +DELETE 6
 </​code>​ </​code>​
  
production/shaman.ceph.com.txt · Last modified: 2023/04/06 00:51 by dmick