Hi all, my chirpstack installation suddently stopped working and I am trying to debug the issue. I have some thoughts, but I wanted to pick your brains.
- I deployed chirpstack
chirpstack/chirpstack:4
- I configured a bunch of gateways, device profiles and devices
- Fast forward a month later, I started to see errors on the UI, more specifically errors like
column device_profile.is_relay does not exist
andValidator function error error=column device_profile.class_b_timeout does not exist
which was very concerning.
Trying to dig further, I realised a few things:
- Checking at
__diesel_schema_migrations
table, I noticed that 2 migrations were executed a few weeks ago. - Comparing my back-ups between the pre-migration and post-migration states, I noticed that indeed, that
public.device_profile
was severly crippled.
For reference here is the schema, post-migration, and my currently deployed chirpstack version is v4.10.1 (as seen from chirpstack UI):
CREATE TABLE public.device_profile (
id uuid NOT NULL,
tenant_id uuid NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
name character varying(100) NOT NULL,
region character varying(10) NOT NULL,
mac_version character varying(10) NOT NULL,
reg_params_revision character varying(20) NOT NULL,
adr_algorithm_id character varying(100) NOT NULL,
payload_codec_runtime character varying(20) NOT NULL,
uplink_interval integer NOT NULL,
device_status_req_interval integer NOT NULL,
supports_otaa boolean NOT NULL,
supports_class_b boolean NOT NULL,
supports_class_c boolean NOT NULL,
tags jsonb NOT NULL,
payload_codec_script text NOT NULL,
flush_queue_on_activate boolean NOT NULL,
description text NOT NULL,
measurements jsonb NOT NULL,
auto_detect_measurements boolean NOT NULL,
region_config_id character varying(100),
allow_roaming boolean NOT NULL,
rx1_delay smallint NOT NULL,
abp_params jsonb,
class_b_params jsonb,
class_c_params jsonb,
relay_params jsonb,
app_layer_params jsonb NOT NULL
);
I understand my bad choice of using the 4
tag (instad of pinning it on some explicit version), which may have caused a newer version of chirpstack to be re-deployed when the infrastructure got restarted at some point of time.
But I would have never expected such a damage even if the deployment picked another version from the v4 branch.
Does anyone have any insights regarding why this may have happend?