Closed kristopherjturner closed 6 years ago
Hey Kris, does it fail with the same error on rerun?
Get Outlook for iOShttps://aka.ms/o0ukef
From: Kris Turner notifications@github.com Sent: Sunday, July 1, 2018 5:04 PM To: mattmcspirit/azurestack Cc: Subscribed Subject: [mattmcspirit/azurestack] Error at Ubuntu Image Stage - 1805.2 Version (#30)
I am playing with this new version for 1805. I ran into an issue on the ubuntu image stage:
TerminatingError(Invoke-RestMethod): "{"error":{"code":"ParentResourceNotFound","message":"Can not perform requested operation on nested resource. Parent resource 'AzureStack-VNET' not found."}}" VERBOSE: [6:51 PM]::[UBUNTUIMAGE]:: ASDK Configuration Stage: UbuntuImage Failed
I will dig into this more but wanted to post this just in case it was an easy fix.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmattmcspirit%2Fazurestack%2Fissues%2F30&data=02%7C01%7CMatt.McSpirit%40microsoft.com%7Caa265ee78f9d4ab999bd08d5dfaf5259%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636660866449540024&sdata=oDp9uCc9BaapzfFD%2B%2FiusemAiE73HCkv4nIyaSQm4m4%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATQYKi4pr6ul1Ym7itA1eRVGSW87xg0wks5uCWNzgaJpZM4U-h3D&data=02%7C01%7CMatt.McSpirit%40microsoft.com%7Caa265ee78f9d4ab999bd08d5dfaf5259%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636660866449540024&sdata=q89HG%2F9HL25W6dwwsePttd9EXqNCeTinRPTr%2FOi5%2BTc%3D&reserved=0.
Yes, I have tried it a few times. I am wondering if the Get command is incorrect? That shows in the logs right before it terminates.
VERBOSE: GET https://management.azure.com/subscriptions/f9eaaf80-8490-4b69-88fd-a168ec890221/resourceGroups/azurestack/providers/Microsoft.AzureStack/registrations/AzureStack-VNET/products?api-version=2016-01-01 with 0-byte payload
That is strange. If you chose to register your ASDK as part of the process, it normally creates a resource in Azure called azurestack. This is created by the registration module, not my script per se. I'm confused why this 'AzureStack-VNET' is being created. The registration section and the Ubuntu image section hasn't really change for multiple releases. I wonder if you should log into Azure portal, remove "Azurestack-vNet" if its not being used for anything, then I'd manually edit the progress.CSV file in your Azure Stack download folder and set the registration step as Incomplete.
I think something is mixed up there but I can't be certain without looking into it a bit more.
Get Outlook for iOShttps://aka.ms/o0ukef
From: Kris Turner notifications@github.com Sent: Sunday, July 1, 2018 5:37 PM To: mattmcspirit/azurestack Cc: Matt McSpirit; Comment Subject: Re: [mattmcspirit/azurestack] Error at Ubuntu Image Stage - 1805.2 Version (#30)
Yes, I have tried it a few times. I am wondering if the Get command is incorrect? That shows in the logs right before it terminates.
VERBOSE: GET https://management.azure.com/subscriptions/f9eaaf80-8490-4b69-88fd-a168ec890221/resourceGroups/azurestack/providers/Microsoft.AzureStack/registrations/AzureStack-VNET/products?api-version=2016-01-01https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmanagement.azure.com%2Fsubscriptions%2Ff9eaaf80-8490-4b69-88fd-a168ec890221%2FresourceGroups%2Fazurestack%2Fproviders%2FMicrosoft.AzureStack%2Fregistrations%2FAzureStack-VNET%2Fproducts%3Fapi-version%3D2016-01-01&data=02%7C01%7CMatt.McSpirit%40microsoft.com%7Cae9c16c75e0a4fa7330308d5dfb3f04c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636660886282095590&sdata=4FACsO3LItuM1%2F%2FZcnM4Afa2jDATSc13aVT6vPF9ze0%3D&reserved=0 with 0-byte payload
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmattmcspirit%2Fazurestack%2Fissues%2F30%23issuecomment-401644559&data=02%7C01%7CMatt.McSpirit%40microsoft.com%7Cae9c16c75e0a4fa7330308d5dfb3f04c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636660886282095590&sdata=QC2PcFy7FZuiH6VYSy4RG8jFBLlPqcfqXC2gqN52yOE%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATQYKot0nOGo8h1TxWvI7PHhhUDAP--Eks5uCWsygaJpZM4U-h3D&data=02%7C01%7CMatt.McSpirit%40microsoft.com%7Cae9c16c75e0a4fa7330308d5dfb3f04c%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636660886282105598&sdata=tiHJO5XJWLnaM1KuRj6Q1Q3knSpM1VFdiObk%2FSQoSuk%3D&reserved=0.
Interesting. I did confirm there was a vnet on that subscription called AzureStack-vNet. I am also playing with automation of ASDK on Azure VM's just to spin one up on an E series for a few days for demos. The ARM I am using creates that. I will delete that vnet and registration to the other ASDK and re-run your script.
Got it. I changed the -aureRegSubID parameter to another subscription.
The first few times I ran the script with the subscription: f9eaaf80-8490-4b69-88fd-a168ec890221
However, I just looked at the logs and it registered the ASDK with another subscription in my Tenant. Once I changed the -azureRegSubID to the actual subscription it had registered under it is now working.
I guess we just need to make sure the subscription we put for that parameter doesn't already have an ASDK registered to it?
It shouldn't be an issue to have a subscription with an existing registration, I do it all the time. Each fresh ASDK should just create a new resource in that subscription for the registration of that ASDK.
So when you ran the script, it will (should) firstly attempt to sign you in based on your tenant name and login credentials. These will be the same creds you used at deployment time for the ASDK. If you used the -registerASDK switch, along with the -useSameCreds switch, and specified the corresponding same subscription, it should have just worked.
I wonder if I need to rethink this subscription thing. Perhaps a better solution would be to ask for the subscriptionID up front, associated with the deployment of the ASDK. If people choose -registerASDK and -UseSameCreds, it will register to that sub, grabbing the tenantID for that sub. It will only use a different sub and creds if you don't specify -useSameCreds and -azureRegSubId.
I'll have to have a play around. This is the biggest challenge, testing against scenarios that I don't have in my environment! It usually affects people who have multiple AD tenants and subs associated with a single set of credentials. I have set that up in my environment to test but I must be missing something.
The account and creds you used to sign in - how many Azure Ad directories do you have access to with that account, and how many subs?
Get Outlook for iOShttps://aka.ms/o0ukef
From: Kris Turner notifications@github.com Sent: Sunday, July 1, 2018 7:01 PM To: mattmcspirit/azurestack Cc: Matt McSpirit; Comment Subject: Re: [mattmcspirit/azurestack] Error at Ubuntu Image Stage - 1805.2 Version (#30)
Got it. I changed the -aureRegSubID to another subscription. However, that brings up a question now, it would have registered using that first subscription I had in the script, correct?
The first few times I ran the script with the subscription: f9eaaf80-8490-4b69-88fd-a168ec890221
However, I just looked at the logs and it registered the ASDK with another subscription in my Tenant. Once I changed the -azureRegSubID to the actual subscription it had registered under it is now working.
I guess we just need to make sure the subscription we put for that parameter doesn't already have an ASDK registered to it?
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmattmcspirit%2Fazurestack%2Fissues%2F30%23issuecomment-401652117&data=02%7C01%7CMatt.McSpirit%40microsoft.com%7C97e4f5c34a984c31328908d5dfbfb7a5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636660936881684135&sdata=G4F8990K8H82e2G6xsu10q00ff7FoSN57lmvBuOAP6U%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATQYKhRjzLJ7J_ekeCt6oS6LFndiLvupks5uCX70gaJpZM4U-h3D&data=02%7C01%7CMatt.McSpirit%40microsoft.com%7C97e4f5c34a984c31328908d5dfbfb7a5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636660936881684135&sdata=lKoOZHG911hYDekBFjJJbDRgLTINPB%2BSLc5m%2BDma7no%3D&reserved=0.
It all worked. Thanks.
Great! For reference, how many subs and tenant directories does your login creds give you access to? I'd like to try to recreate your setup in my subs/tenants so I can reduce the chance for errors if possible! If you could use examples like:
Sub A - tenant A, (directory role: global Admin)
If you prefer email, that works also, just let me know.
Thanks Kris!
Get Outlook for iOShttps://aka.ms/o0ukef
From: Kris Turner notifications@github.com Sent: Monday, July 2, 2018 7:56 AM To: mattmcspirit/azurestack Cc: Matt McSpirit; Comment Subject: Re: [mattmcspirit/azurestack] Error at Ubuntu Image Stage - 1805.2 Version (#30)
It all worked. Thanks.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmattmcspirit%2Fazurestack%2Fissues%2F30%23issuecomment-401833441&data=02%7C01%7CMatt.McSpirit%40microsoft.com%7Cb4ef040911cc4c5a46c508d5e02c0999%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636661402106297903&sdata=zfTJATo3bPQXHYodsHMdf%2F8m00hmtkARrt41ziTJ7QE%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATQYKtHeXZMP2JSyDzBoeOentOFpQYMNks5uCjSugaJpZM4U-h3D&data=02%7C01%7CMatt.McSpirit%40microsoft.com%7Cb4ef040911cc4c5a46c508d5e02c0999%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636661402106307916&sdata=1tabdX1Ut8X0R7U71xMJKZOoAjn5LRIZKLzNF9IBk3E%3D&reserved=0.
I am playing with this new version for 1805. I ran into an issue on the ubuntu image stage:
I will dig into this more but wanted to post this just in case it was an easy fix.