Create geo partition table error on multi-region setup

hello, I have 3 regions with nine node total and everything seems to be working. I’m testing this geo partition table on the main master,and got the error, cannot figure out what I should be looking at…I started all nodes using “yugabyted”

drop TABLESPACE us_east1 ;
CREATE TABLESPACE us_east1 WITH (
replica_placement=‘{“num_replicas”: 3,
“placement_blocks”:[
{“cloud”:“ib”,“region”:“us-east1”,“zone”:“us-east1-1a”,“min_num_replicas”:1},
{“cloud”:“ib”,“region”:“us-east1”,“zone”:“us-east1-1b”,“min_num_replicas”:1},
{“cloud”:“ib”,“region”:“us-east1”,“zone”:“us-east1-1c”,“min_num_replicas”:1}
]}’
);
drop TABLE parent_test;
CREATE TABLE parent_test (
id character varying(36) not null ,
client_id character varying(255) ,
details_json character varying(5110) ,
error character varying(255) ,
ip_address character varying(255) ,
realm_id character varying(255) ,
session_id character varying(255) ,
event_time bigint not null ,
type character varying(255) ,
user_id character varying(255) ,
created_date timestamp without time zone ,
geo_partition VARCHAR,
CONSTRAINT test_pk PRIMARY KEY (id, event_time,geo_partition)
) PARTITION BY LIST (geo_partition );

–Create child tables for each of the geos in the respective tablespaces:
CREATE TABLE child_test_east1 PARTITION OF parent_test (
id ,
client_id ,
details_json ,
error ,
ip_address ,
realm_id ,
session_id ,
event_time ,
type ,
user_id ,
created_date ,
geo_partition ,
PRIMARY KEY (id HASH, event_time, geo_partition)
) FOR VALUES IN (‘EAST1’) TABLESPACE us_east1;

ERROR: Invalid table definition: Error creating table yugabyte.child_test_east1 on the master: Not enough tablet servers in the requested placements. Need at least 2, have 0

Hi, are you sure that you have set the cloud location when starting yugabyted, for example with --cloud_location ib.us-east1.us-east1-1a for the nodes in us-east1-1a?

Thanks for responding FranckPachot! Yes I did when I created used the param -cloud_location, but after lookng at this for last 2 days, i realize it’s user error, I had misspell region”:“us-east1” which should be region”:“us-east-1” so now it works on table creation. thanks!

1 Like

It’s not an obvious understanding of the error message, wished it was reworded but then it does make sense after I thought about it