diff --git a/pkg/components/master.go b/pkg/components/master.go index ee587d763..0fc639422 100644 --- a/pkg/components/master.go +++ b/pkg/components/master.go @@ -372,7 +372,7 @@ func (m *Master) createInitScript() (string, error) { "/usr/bin/yt create scheduler_pool_tree --attributes '{name=default; config={nodes_filter=\"\"}}' --ignore-existing", SetWithIgnoreExisting("//sys/pool_trees/@default_tree", "default"), RunIfNonexistent("//sys/pools", "/usr/bin/yt link //sys/pool_trees/default //sys/pools"), - "/usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' --ignore-existing", + RunIfNonexistent("//sys/pool_trees/default/research", "/usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}'"), "/usr/bin/yt create map_node //home --ignore-existing", RunIfExists("//sys/@provision_lock", fmt.Sprintf("/usr/bin/yt set //sys/@cluster_connection '%s'", string(clusterConnection))), m.initAdminUser(), diff --git a/test/r8r/canondata/Components reconciler Minimal Test/ConfigMap default-yt-master-init-job-config.yaml b/test/r8r/canondata/Components reconciler Minimal Test/ConfigMap default-yt-master-init-job-config.yaml index 5ae60f6fc..891c97a2c 100644 --- a/test/r8r/canondata/Components reconciler Minimal Test/ConfigMap default-yt-master-init-job-config.yaml +++ b/test/r8r/canondata/Components reconciler Minimal Test/ConfigMap default-yt-master-init-job-config.yaml @@ -77,7 +77,9 @@ data: if [ $(/usr/bin/yt exists //sys/pools) = 'false' ]; then /usr/bin/yt link //sys/pool_trees/default //sys/pools fi - /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' --ignore-existing + if [ $(/usr/bin/yt exists //sys/pool_trees/default/research) = 'false' ]; then + /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' + fi /usr/bin/yt create map_node //home --ignore-existing if [ $(/usr/bin/yt exists //sys/@provision_lock) = 'true' ]; then /usr/bin/yt set //sys/@cluster_connection '{ diff --git a/test/r8r/canondata/Components reconciler With CRI and NVIDIA container runtime - CRI-O Test/ConfigMap default-yt-master-init-job-config.yaml b/test/r8r/canondata/Components reconciler With CRI and NVIDIA container runtime - CRI-O Test/ConfigMap default-yt-master-init-job-config.yaml index 5ae60f6fc..891c97a2c 100644 --- a/test/r8r/canondata/Components reconciler With CRI and NVIDIA container runtime - CRI-O Test/ConfigMap default-yt-master-init-job-config.yaml +++ b/test/r8r/canondata/Components reconciler With CRI and NVIDIA container runtime - CRI-O Test/ConfigMap default-yt-master-init-job-config.yaml @@ -77,7 +77,9 @@ data: if [ $(/usr/bin/yt exists //sys/pools) = 'false' ]; then /usr/bin/yt link //sys/pool_trees/default //sys/pools fi - /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' --ignore-existing + if [ $(/usr/bin/yt exists //sys/pool_trees/default/research) = 'false' ]; then + /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' + fi /usr/bin/yt create map_node //home --ignore-existing if [ $(/usr/bin/yt exists //sys/@provision_lock) = 'true' ]; then /usr/bin/yt set //sys/@cluster_connection '{ diff --git a/test/r8r/canondata/Components reconciler With CRI and NVIDIA container runtime Test/ConfigMap default-yt-master-init-job-config.yaml b/test/r8r/canondata/Components reconciler With CRI and NVIDIA container runtime Test/ConfigMap default-yt-master-init-job-config.yaml index 5ae60f6fc..891c97a2c 100644 --- a/test/r8r/canondata/Components reconciler With CRI and NVIDIA container runtime Test/ConfigMap default-yt-master-init-job-config.yaml +++ b/test/r8r/canondata/Components reconciler With CRI and NVIDIA container runtime Test/ConfigMap default-yt-master-init-job-config.yaml @@ -77,7 +77,9 @@ data: if [ $(/usr/bin/yt exists //sys/pools) = 'false' ]; then /usr/bin/yt link //sys/pool_trees/default //sys/pools fi - /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' --ignore-existing + if [ $(/usr/bin/yt exists //sys/pool_trees/default/research) = 'false' ]; then + /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' + fi /usr/bin/yt create map_node //home --ignore-existing if [ $(/usr/bin/yt exists //sys/@provision_lock) = 'true' ]; then /usr/bin/yt set //sys/@cluster_connection '{ diff --git a/test/r8r/canondata/Components reconciler With CRI job environment - CRI-O Test/ConfigMap default-yt-master-init-job-config.yaml b/test/r8r/canondata/Components reconciler With CRI job environment - CRI-O Test/ConfigMap default-yt-master-init-job-config.yaml index 5ae60f6fc..891c97a2c 100644 --- a/test/r8r/canondata/Components reconciler With CRI job environment - CRI-O Test/ConfigMap default-yt-master-init-job-config.yaml +++ b/test/r8r/canondata/Components reconciler With CRI job environment - CRI-O Test/ConfigMap default-yt-master-init-job-config.yaml @@ -77,7 +77,9 @@ data: if [ $(/usr/bin/yt exists //sys/pools) = 'false' ]; then /usr/bin/yt link //sys/pool_trees/default //sys/pools fi - /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' --ignore-existing + if [ $(/usr/bin/yt exists //sys/pool_trees/default/research) = 'false' ]; then + /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' + fi /usr/bin/yt create map_node //home --ignore-existing if [ $(/usr/bin/yt exists //sys/@provision_lock) = 'true' ]; then /usr/bin/yt set //sys/@cluster_connection '{ diff --git a/test/r8r/canondata/Components reconciler With CRI job environment Test/ConfigMap default-yt-master-init-job-config.yaml b/test/r8r/canondata/Components reconciler With CRI job environment Test/ConfigMap default-yt-master-init-job-config.yaml index 5ae60f6fc..891c97a2c 100644 --- a/test/r8r/canondata/Components reconciler With CRI job environment Test/ConfigMap default-yt-master-init-job-config.yaml +++ b/test/r8r/canondata/Components reconciler With CRI job environment Test/ConfigMap default-yt-master-init-job-config.yaml @@ -77,7 +77,9 @@ data: if [ $(/usr/bin/yt exists //sys/pools) = 'false' ]; then /usr/bin/yt link //sys/pool_trees/default //sys/pools fi - /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' --ignore-existing + if [ $(/usr/bin/yt exists //sys/pool_trees/default/research) = 'false' ]; then + /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' + fi /usr/bin/yt create map_node //home --ignore-existing if [ $(/usr/bin/yt exists //sys/@provision_lock) = 'true' ]; then /usr/bin/yt set //sys/@cluster_connection '{ diff --git a/test/r8r/canondata/Components reconciler With all components Test/ConfigMap default-yt-master-init-job-config.yaml b/test/r8r/canondata/Components reconciler With all components Test/ConfigMap default-yt-master-init-job-config.yaml index b747e5902..59f18356d 100644 --- a/test/r8r/canondata/Components reconciler With all components Test/ConfigMap default-yt-master-init-job-config.yaml +++ b/test/r8r/canondata/Components reconciler With all components Test/ConfigMap default-yt-master-init-job-config.yaml @@ -92,7 +92,9 @@ data: if [ $(/usr/bin/yt exists //sys/pools) = 'false' ]; then /usr/bin/yt link //sys/pool_trees/default //sys/pools fi - /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' --ignore-existing + if [ $(/usr/bin/yt exists //sys/pool_trees/default/research) = 'false' ]; then + /usr/bin/yt create scheduler_pool --attributes '{name=research; pool_tree=default}' + fi /usr/bin/yt create map_node //home --ignore-existing if [ $(/usr/bin/yt exists //sys/@provision_lock) = 'true' ]; then /usr/bin/yt set //sys/@cluster_connection '{