New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az group export extracts arguably the wrong error message from result and excludes the whole template if anything fails to export #3889

Closed
johanste opened this Issue Jun 26, 2017 · 5 comments

Comments

Projects
None yet
6 participants
@johanste
Member

johanste commented Jun 26, 2017

Description

There are plenty of resource types that currently fail on export (service issue). From the portal, you will get everything that was possible to export + list of error messages for things that couldn't be exported. From the CLI, you just get the first sub-error and nothing else if there is one or more errors.

For example, when running with verbose, you will see the following data in the log - but the error message is only "Could not get resources of the type 'Microsoft.Network/loadBalancers'. Resources of this type will not be exported" and the partial valid template is not output at all...

,"error":{"code":"ExportTemplateCompletedWithErrors","message":"Export template operation completed with errors. Some resources were not exported. Please see details for more information.","details":[{"code":"ExportTemplateProviderError","target":"Microsoft.Network/loadBalancers","message":"Could not get resources of the type \'Microsoft.Network/loadBalancers\'. Resources of this type will not be exported."},{"code":"ExportTemplateProviderError","target":"Microsoft.Network/networkInterfaces","message":"Could not get resources of the type \'Microsoft.Network/networkInterfaces\'. Resources of this type will not be exported."},{"code":"ExportTemplateProviderError","target":"Microsoft.Network/networkSecurityGroups","message":"Could not get resources of the type \'Microsoft.Network/networkSecurityGroups\'. Resources of this type will not be exported."},{"code":"ExportTemplateProviderError","target":"Microsoft.Network/publicIPAddresses","message":"Could not get resources of the type \'Microsoft.Network/publicIPAddresses\'. Resources of this type will not be exported."},{"code":"ExportTemplateProviderError","target":"Microsoft.Network/virtualNetworks","message":"Could not get resources of the type \'Microsoft.Network/virtualNetworks\'. Resources of this type will not be exported."},{"code":"ExportTemplateProviderError","target":"Microsoft.Web/sites/premieraddons","message":"Could not get resources of the type \'Microsoft.Web/sites/premieraddons\'. Resources of this type will not be exported."},{"code":"ExportTemplateProviderError","target":"Microsoft.Web/sites/sourcecontrols","message":"Could not get resources of the type \'Microsoft.Web/sites/sourcecontrols\'. Resources of this type will not be exported."}]}}'

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Pip

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Latest

OS Version: What OS and version are you using?
Windows

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Bash

@markheath

This comment has been minimized.

Show comment
Hide comment
@markheath

markheath Oct 23, 2017

Contributor

I'm running into this a lot - makes the az group export command almost unusable

Contributor

markheath commented Oct 23, 2017

I'm running into this a lot - makes the az group export command almost unusable

@mikewiegand

This comment has been minimized.

Show comment
Hide comment
@mikewiegand

mikewiegand Jan 9, 2018

Hi,
is there any update on this? I'd love to see this work.
thanks

mikewiegand commented Jan 9, 2018

Hi,
is there any update on this? I'd love to see this work.
thanks

@sshorkey

This comment has been minimized.

Show comment
Hide comment
@sshorkey

sshorkey Feb 6, 2018

+1 to seeing a fix.. it should give least a partial template from what it can extract and spit out error messages for whatever it can't. Any workarounds possible in the meantime?

sshorkey commented Feb 6, 2018

+1 to seeing a fix.. it should give least a partial template from what it can extract and spit out error messages for whatever it can't. Any workarounds possible in the meantime?

@tjprescott tjprescott added this to the Sprint 32 milestone Feb 6, 2018

@jochenvanwylick

This comment has been minimized.

Show comment
Hide comment
@jochenvanwylick

jochenvanwylick commented Feb 7, 2018

+1

@tjprescott

This comment has been minimized.

Show comment
Hide comment
@tjprescott

tjprescott Feb 7, 2018

Member

Does running the command with --debug give you any additional information?

Member

tjprescott commented Feb 7, 2018

Does running the command with --debug give you any additional information?

@tjprescott tjprescott self-assigned this Feb 7, 2018

tjprescott added a commit to tjprescott/azure-cli that referenced this issue Feb 13, 2018

@tjprescott tjprescott referenced this issue Feb 13, 2018

Merged

`az group export` fix output on failure #5555

1 of 1 task complete

tjprescott added a commit that referenced this issue Feb 13, 2018

`az group export` fix output on failure (#5555)
* Fix #3889.

* Code review feedback.

LukaszStem pushed a commit to LukaszStem/azure-cli that referenced this issue Feb 21, 2018

v-Ajnava added a commit to v-Ajnava/azure-cli that referenced this issue Mar 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment