Open fleetcaptain opened 2 years ago
@fleetcaptain , If you have root access you can go to the corresponding /var/lib directory and run the aws_domainjoin.sh yourself with parameters and paste the error. The parameters can be seen in /var/log/amazon/ssm/amazon.log I am assuming you have setup secrets manager access.
@fleetcaptain
If I run a subset of that command manually: aws ds describe-directories --region us-east-2 ...the JSON value OwnerDirectoryDescription does not seem to appear in the output. Did describe-directories change the output format recently
Works for me
% aws ds describe-directories --region us-east-2
{
"DirectoryDescriptions": [
{
Thanks, I'll try running the script manually and see what happens.
Running the command manually appears to have resolved my issue. Thank you!
I also came across this issue with my client where the absence of OwnerDirectoryDescription
from the response of describe-directories
causes the seamless joining script to fail. Can this be reviewed and fixed because the manual approach would create a lot of toils.
The OwnerDirectoryDescription
seems to be present only when the Directory is shared via "Scale and Share" from a different account. That means the script won't work for:
Tagging @rhaoran-aws @VishnuKarthikRavindran
Thanks for reaching us @digihunch. We will look into it
Does this mean that we cannot use the Runcommand for domain join with AD Connectors?
This issue may be related to #418.
I'm testing AWS Directory Services and getting the error "Failed: Cannot find parent directory Id" when trying to use the aws-domainjoin plugin in Systems Manager.
The aws_domainjoin.sh script at https://github.com/aws/amazon-ssm-agent/blob/mainline/agent/plugins/domainjoin/domainjoin_unix_script.go has function get_servicecreds() which looks like:
If I understand correctly, the "***Failed: Cannot find parent directory Id" message is generated if this AWS cli command fails: AWSCLI ds describe-directories --region $REGION --query "DirectoryDescriptions[?DirectoryId =='$DIRECTORY_ID'].OwnerDirectoryDescription.DirectoryId | [0]" | sed 's/"//g'
If I run a subset of that command manually:
aws ds describe-directories --region us-east-2
...the JSON value OwnerDirectoryDescription does not seem to appear in the output. Did describe-directories change the output format recently?Wondering if I missed something else.