```
[05:46:46] ALTER TENANT [4] RENAME TO blux;
[05:46:46] ALTER TENANT blux RENAME TO 'blix';
[05:46:47] SELECT * FROM [SHOW TENANTS] WHERE id = 4;
[05:46:47] -- OK;
[05:46:47] ALTER TENANT blix RENAME TO three;
[05:46:47] SELECT * FROM [SHOW TENANTS] WHERE id = 4;
[05:46:47] -- OK;
[05:46:47] SELECT id, name, data_state, service_mode, source_tenant_name FROM [SHOW TENANTS WITH REPLICATION STATUS] WHERE id = 4;
[05:46:47] -- OK;
[05:46:47] SHOW TENANT seven;
[05:46:47] CREATE TENANT three;
[05:46:47] CREATE TENANT IF NOT EXISTS three;
[05:46:47] set default_transaction_read_only = on;;
[05:46:47] CREATE TENANT four;;
[05:46:47] set default_transaction_read_only = off;;
[05:46:47] CREATE TENANT four;
=== RUN TestLogic_tenant/service_mode
[05:46:49] ALTER TENANT 'tenant-one' START SERVICE EXTERNAL;
[05:46:49] ALTER TENANT 'tenant-one' START SERVICE EXTERNAL;
[05:46:49] ALTER TENANT two START SERVICE SHARED;
[05:46:49] ALTER TENANT two START SERVICE SHARED;
[05:46:49] ALTER TENANT 'tenant-one' START SERVICE SHARED;
[05:46:49] ALTER TENANT two START SERVICE EXTERNAL;
[05:46:49] DROP TENANT two;
[05:46:49] DROP TENANT 'tenant-one';
[05:46:49] SHOW TENANTS;
[05:46:49] -- OK;
[05:46:49] ALTER TENANT two STOP SERVICE;
[05:46:49] ALTER TENANT 'tenant-one' STOP SERVICE;
[05:46:49] SHOW TENANTS;
[05:46:49] -- OK;
[05:46:49] DROP TENANT two;
[05:46:49] DROP TENANT 'tenant-one';
=== RUN TestLogic_tenant/tenant_templates
[05:46:50] SHOW CLUSTER SETTING sql.create_tenant.default_template;
[05:46:50] -- OK;
[05:46:50] CREATE TENANT othertenant LIKE system;
[05:46:50] CREATE TENANT tmpl;
ALTER TENANT tmpl GRANT CAPABILITY can_view_node_info; -- will be copied
ALTER TENANT tmpl SET CLUSTER SETTING trace.debug.enable = true; -- will be copied
-- Simulate resource limits. Will be copied.
-- Note: we cannot use the update_tenant_resource_limits() builtin
-- directly here because it can only be used from a CCL binary.
INSERT INTO system.tenant_usage(
tenant_id, instance_id, next_instance_id, last_update,
ru_burst_limit, ru_refill_rate, ru_current, current_share_sum, total_consumption)
VALUES ((SELECT id FROM system.tenants WHERE name = 'tmpl'), 0, 0, now(),
11, 22, 33, 44, ''::BYTES);
ALTER TENANT tmpl START SERVICE SHARED; -- will not be copied.;
[05:46:50] CREATE TENANT othertenant LIKE tmpl;
```
Help
See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)
pkg/sql/logictest/tests/fakedist-disk/fakedist-disk_test.TestLogic_tenant failed with artifacts on master @ 678cfd4cbebbf3cced16747baf42a4c54cb2a92d:
Fatal error:
Stack:
Log preceding fatal error
``` [05:46:46] ALTER TENANT [4] RENAME TO blux; [05:46:46] ALTER TENANT blux RENAME TO 'blix'; [05:46:47] SELECT * FROM [SHOW TENANTS] WHERE id = 4; [05:46:47] -- OK; [05:46:47] ALTER TENANT blix RENAME TO three; [05:46:47] SELECT * FROM [SHOW TENANTS] WHERE id = 4; [05:46:47] -- OK; [05:46:47] SELECT id, name, data_state, service_mode, source_tenant_name FROM [SHOW TENANTS WITH REPLICATION STATUS] WHERE id = 4; [05:46:47] -- OK; [05:46:47] SHOW TENANT seven; [05:46:47] CREATE TENANT three; [05:46:47] CREATE TENANT IF NOT EXISTS three; [05:46:47] set default_transaction_read_only = on;; [05:46:47] CREATE TENANT four;; [05:46:47] set default_transaction_read_only = off;; [05:46:47] CREATE TENANT four; === RUN TestLogic_tenant/service_mode [05:46:49] ALTER TENANT 'tenant-one' START SERVICE EXTERNAL; [05:46:49] ALTER TENANT 'tenant-one' START SERVICE EXTERNAL; [05:46:49] ALTER TENANT two START SERVICE SHARED; [05:46:49] ALTER TENANT two START SERVICE SHARED; [05:46:49] ALTER TENANT 'tenant-one' START SERVICE SHARED; [05:46:49] ALTER TENANT two START SERVICE EXTERNAL; [05:46:49] DROP TENANT two; [05:46:49] DROP TENANT 'tenant-one'; [05:46:49] SHOW TENANTS; [05:46:49] -- OK; [05:46:49] ALTER TENANT two STOP SERVICE; [05:46:49] ALTER TENANT 'tenant-one' STOP SERVICE; [05:46:49] SHOW TENANTS; [05:46:49] -- OK; [05:46:49] DROP TENANT two; [05:46:49] DROP TENANT 'tenant-one'; === RUN TestLogic_tenant/tenant_templates [05:46:50] SHOW CLUSTER SETTING sql.create_tenant.default_template; [05:46:50] -- OK; [05:46:50] CREATE TENANT othertenant LIKE system; [05:46:50] CREATE TENANT tmpl; ALTER TENANT tmpl GRANT CAPABILITY can_view_node_info; -- will be copied ALTER TENANT tmpl SET CLUSTER SETTING trace.debug.enable = true; -- will be copied -- Simulate resource limits. Will be copied. -- Note: we cannot use the update_tenant_resource_limits() builtin -- directly here because it can only be used from a CCL binary. INSERT INTO system.tenant_usage( tenant_id, instance_id, next_instance_id, last_update, ru_burst_limit, ru_refill_rate, ru_current, current_share_sum, total_consumption) VALUES ((SELECT id FROM system.tenants WHERE name = 'tmpl'), 0, 0, now(), 11, 22, 33, 44, ''::BYTES); ALTER TENANT tmpl START SERVICE SHARED; -- will not be copied.; [05:46:50] CREATE TENANT othertenant LIKE tmpl; ```
Help
See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)
/cc @cockroachdb/sql-queries
This test on roachdash | Improve this report!
Jira issue: CRDB-26938