org-formation-cli icon indicating copy to clipboard operation
org-formation-cli copied to clipboard

You cannot add an organizational unit to the specified parent because it would exceed the max depth allowed.

Open kaihendry opened this issue 3 years ago • 2 comments
trafficstars

Subject of the issue

I'm reorganising my Org structure and it's stuck here:

image

Your environment

  • 0.9.19 *running in AWS codepipeline

Steps to reproduce

Move an account around a new nest OU

Expected behaviour

Move to happen

Actual behaviour

INFO: Executing: update-organization organization.yml.
--
43 | ERROR: failed executing task: Attach OU (Infrastructure) OC::ORG::OrganizationalUnit Platform ConstraintViolationException: You cannot add an organizational unit to the specified parent because it would exceed the max depth allowed.
44 | ERROR: Task OrganizationUpdate execute failed. reason: You cannot add an organizational unit to the specified parent because it would exceed the max depth allowed.
45 | You cannot add an organizational unit to the specified parent because it would exceed the max depth allowed. (use option --print-stack to print stack)
46 | ERROR:
47 | ERROR: ==========================
48 | ERROR: Stopped performing task(s)
49 | ERROR: Following tasks failed:
50 | ERROR:  - Task OrganizationUpdate
51 | ERROR: Following tasks were not executed:
52 | ERROR:  - Task OrganizationBuildPipeline
53 | ERROR: ==========================
54 | ERROR:
55 | ERROR: Task OrganizationBuild execute failed. reason: Number of failed tasks 1 exceeded tolerance for failed tasks 0.
56 | ERROR:
57 | ERROR: ==========================
58 | ERROR: Stopped performing task(s)
59 | ERROR: Following tasks failed:
60 | ERROR:  - Task OrganizationBuild
61 | ERROR: Following tasks were not executed:
62 | ERROR:  - Task Types
63 | ERROR:  - Task AWSSSO
64 | ERROR: ==========================
65 | ERROR:
66 | ERROR: Number of failed tasks 1 exceeded tolerance for failed tasks 0.
67 |  
68 | [Container] 2022/05/24 07:45:07 Command did not exit successfully org-formation perform-tasks ./organization-tasks.yml --no-color --state-bucket-name organization-formation-705671790868 --state-object state.json exit status 1
69 | [Container] 2022/05/24 07:45:07 Phase complete: BUILD State: FAILED
70 | [Container] 2022/05/24 07:45:07 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: org-formation perform-tasks ./organization-tasks.yml --no-color --state-bucket-name organization-formation-705671790868 --state-object state.json. Reason: exit status 1

kaihendry avatar May 24 '22 08:05 kaihendry

thanks!

do you have an example of previous and target-state template? I'll have a look at what the actual limit is you run into (maybe shorting -org-formation-move-source would be a quick workaround)

OlafConijn avatar May 24 '22 09:05 OlafConijn

https://s.natalian.org/2022-05-24/4a9d6eb.txt https://s.natalian.org/2022-05-24/d30ea53.txt

(ins)hendry-tw-mbp~/sorg/organization-formation$ git log --oneline
d30ea53 (HEAD -> main, origin/main, origin/HEAD) Trying what we had before
4a9d6eb Try move to nest
(ins)hendry-tw-mbp~/sorg/organization-formation$ git show 4a9d6eb:organization.yml > 4a9d6eb.txt
(ins)hendry-tw-mbp~/sorg/organization-formation$ git show d30ea53:organization.yml > d30ea53.txt

kaihendry avatar May 24 '22 11:05 kaihendry