Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[computes] removed admissiond from impala readiness check #3947

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions apps/beeswax/src/beeswax/migrations/0004_alter_compute_is_ready.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.25 on 2025-01-09 11:39

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('beeswax', '0003_compute_namespace'),
]

operations = [
migrations.AlterField(
model_name='compute',
name='is_ready',
field=models.BooleanField(default=True, null=True),
),
]
2 changes: 1 addition & 1 deletion apps/beeswax/src/beeswax/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ class Compute(models.Model):
default='sqlalchemy'
)
namespace = models.ForeignKey(Namespace, on_delete=models.CASCADE, null=True)
is_ready = models.BooleanField(default=True)
is_ready = models.BooleanField(default=True, null=True)
external_id = models.CharField(max_length=255, null=True, db_index=True)
ldap_groups_json = models.TextField(default='[]')
settings = models.TextField(default='{}')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,10 @@ def populate_impala(namespace, impala):
catalogd_dep = next((d for d in deployments if d.metadata.labels['app'] == 'catalogd'), None)
catalogd_stfs = next((s for s in stfs if s.metadata.labels['app'] == 'catalogd'), None)
statestore_dep = next((d for d in deployments if d.metadata.labels['app'] == 'statestored'), None)
admissiond_dep = next((d for d in deployments if d.metadata.labels['app'] == 'admissiond'), None)

impala['is_ready'] = bool(((catalogd_dep and catalogd_dep.status.ready_replicas) or (
catalogd_stfs and catalogd_stfs.status.ready_replicas))
and (statestore_dep and statestore_dep.status.ready_replicas)
and (admissiond_dep and admissiond_dep.status.ready_replicas))
and (statestore_dep and statestore_dep.status.ready_replicas))

if not impala['is_ready']:
LOG.info("Impala %s not ready" % namespace)
Expand All @@ -187,12 +185,12 @@ def populate_impala(namespace, impala):
update_impala_configs(namespace, impala, 'impala-proxy.%s.svc.cluster.local' % namespace)
else:
coordinator = next((s for s in stfs if s.metadata.labels['app'] == 'coordinator'), None)
impala['is_ready'] = impala['is_ready'] and (coordinator and coordinator.status.ready_replicas)
impala['is_ready'] = bool(impala['is_ready'] and (coordinator and coordinator.status.ready_replicas))

hs2_stfs = next((s for s in stfs if s.metadata.labels['app'] == 'hiveserver2'), None)
if hs2_stfs:
# Impala is running with UA
impala['is_ready'] = impala['is_ready'] and hs2_stfs.status.ready_replicas
impala['is_ready'] = bool(impala['is_ready'] and hs2_stfs.status.ready_replicas)
update_hive_configs(namespace, impala, 'hiveserver2-service.%s.svc.cluster.local' % namespace)
else:
# Impala is not running with UA
Expand Down