canonical / jhack

Chock-full of Juju hackery.
Apache License 2.0
48 stars 23 forks source link

jhack crashes on huge bundle deplyment: jhack/helpers.py:519 in _get_units #158

Closed taurus-forever closed 1 month ago

taurus-forever commented 1 month ago

Hi,

Try to deploy the bundle: https://pastebin.canonical.com/p/zZyzMKpSNg/ and execute jhack tail in the middle:

ubuntu@juju350:~$ juju status                                                                                                                                                                                                                           
Model           Controller  Cloud/Region         Version  SLA          Timestamp                                                                                                                                                                        
test1716551701  lxd         localhost/localhost  3.5.0    unsupported  14:12:43+02:00                                                                                                                                                                   

App              Version  Status       Scale  Charm                     Channel        Rev  Exposed  Message                                                                                                                                            
app-int                   active           2  postgresql-test-app       latest/stable  119  no                                                                                                                                                          
data-ext                  blocked          3  data-integrator           latest/edge     26  no       Please relate the data-integrator with the desired product                                                                                         
grafana-pg                unknown          0  grafana-agent             latest/edge    143  no                                                                                                                                                          
grafana-pgb-ext           waiting        0/3  grafana-agent             latest/edge    143  no       agent initialising                                                                                                                                 
grafana-pgb-int           unknown          0  grafana-agent             latest/edge    143  no                                                                                                                                                          
pgbouncer-ext             maintenance      3  pgbouncer                 1/stable       174  no       Installing and configuring PgBouncer                                                                                                               
pgbouncer-int             maintenance      2  pgbouncer                 1/stable       174  no       Installing and configuring PgBouncer                                                                                                               
postgresql                maintenance      3  postgresql                14/stable      363  no       installing PostgreSQL                                                                                                                              
s3                        blocked          1  s3-integrator             latest/stable   17  no       Missing parameters: ['access-key', 'secret-key']                                                                                                   
tls                       active           1  self-signed-certificates  latest/stable   72  no                                                                                                                                                          

Unit                  Workload     Agent       Machine  Public address  Ports  Message                                                                                                                                                                  
app-int/0*            active       idle        4        10.142.152.180                                                                                                                                                                                  
  pgbouncer-int/0*    maintenance  executing            10.142.152.180         (install) Installing and configuring PgBouncer                                                                                                                           
app-int/1             active       idle        5        10.142.152.243                                                                                                                                                                                  
  pgbouncer-int/1     maintenance  executing            10.142.152.243         (install) Installing and configuring PgBouncer                                                                                                                           
data-ext/0            blocked      idle        0        10.142.152.63          Please relate the data-integrator with the desired product                                                                                                               
  grafana-pgb-ext/2   waiting      allocating           10.142.152.63          agent initialising                                                                                                                                                       
  pgbouncer-ext/2     maintenance  executing            10.142.152.63          (install) Installing and configuring PgBouncer                                                                                                                           
data-ext/1            blocked      idle        6        10.142.152.2           Please relate the data-integrator with the desired product                                                                                                               
  grafana-pgb-ext/1   waiting      allocating           10.142.152.2           agent initialising                                                                                                                                                       
  pgbouncer-ext/1     maintenance  executing            10.142.152.2           (install) Installing and configuring PgBouncer                                                                                                                           
data-ext/2*           blocked      idle        7        10.142.152.148         Please relate the data-integrator with the desired product                                                                                                               
  grafana-pgb-ext/0*  waiting      allocating           10.142.152.148         agent initialising                                                                                                                                                       
  pgbouncer-ext/0*    maintenance  executing            10.142.152.148         (install) Installing and configuring PgBouncer                                                                                                                           
postgresql/0          maintenance  executing   1        10.142.152.80          (install) installing PostgreSQL                                                                                                                                          
postgresql/1          maintenance  executing   2        10.142.152.251         (install) installing PostgreSQL                                                                                                                                          
postgresql/2*         maintenance  executing   3        10.142.152.188         (install) installing PostgreSQL                                                                                                                                          
s3/0*                 blocked      idle        4        10.142.152.180         Missing parameters: ['access-key', 'secret-key']                                                                                                                         
tls/0*                active       idle        8        10.142.152.158                                                                                                                                                                                  

Machine  State    Address         Inst id        Base          AZ  Message                                                                                                                                                                              
0        started  10.142.152.63   juju-75eaab-0  ubuntu@22.04      Running                                                                                                                                                                              
1        started  10.142.152.80   juju-75eaab-1  ubuntu@22.04      Running                                                                                                                                                                              
2        started  10.142.152.251  juju-75eaab-2  ubuntu@22.04      Running                                                                                                                                                                              
3        started  10.142.152.188  juju-75eaab-3  ubuntu@22.04      Running                                                                                                                                                                              
4        started  10.142.152.180  juju-75eaab-4  ubuntu@22.04      Running                                                                                                                                                                              
5        started  10.142.152.243  juju-75eaab-5  ubuntu@22.04      Running                                                                                                                                                                              
6        started  10.142.152.2    juju-75eaab-6  ubuntu@22.04      Running                                                                                                                                                                              
7        started  10.142.152.148  juju-75eaab-7  ubuntu@22.04      Running                                                                                                                                                                              
8        started  10.142.152.158  juju-75eaab-8  ubuntu@22.04      Running                                                                                                                                                                              

Jhack will crash: crash.txt Expected results: do not crash :-D

PietroPasotti commented 1 month ago

I think the issue is not related to the model being huge but one of the applications still being set up (0/3) and not having any units yet. Fixing that now.