Skip to content
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

backup_protectable_items_operations: Input provided for the call is invalid #1422

Closed
ecgg opened this issue Sep 8, 2017 · 5 comments
Closed
Assignees
Labels
ARM question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@ecgg
Copy link

ecgg commented Sep 8, 2017

Version info

pip3 freeze:
azure-mgmt-recoveryservicesbackup==0.1.1
msrest==0.4.14
msrestazure==0.4.13

Issue

Following the test case here I do the following.

The backup vault is in another resource group ( config['Backup']['ResourceGroup'] ) than the VM. I can add the VM to backups via Azure Portal.

container_name = "iaasvmcontainer;" + "iaasvmcontainerv2;" + group + ";" + vm_name
logging.info('container name: {}'.format(container_name))
pi_name = "vm;iaasvmcontainerv2;" + group + ";" + vm_name
logging.info('protected item name: {}'.format(pi_name))

protectable_items = recovery_client.backup_protectable_items.list(bkp_vlt, config['Backup']['ResourceGroup'], raw=True)
vm_to_bkp  = next(protectable_item for protectable_item in protectable_items if container_name.lower() in protectable_item.name.lower()).properties

This results in

2017-09-08 16:21:14,488 container name: iaasvmcontainer;iaasvmcontainerv2;ecaz_infra;ecazjump1
2017-09-08 16:21:14,488 protected item name: vm;iaasvmcontainerv2;ecaz_infra;ecazjump1

Input provided for the call is invalid
Please check the required inputs Traceback (most recent call last):
  File "./azure-backup-create.py", line 114, in <module>
    vm_to_bkp  = next(protectable_item for protectable_item in protectable_items if container_name.lower() in protectable_item.name.lower()).properties
  File "./azure-backup-create.py", line 114, in <genexpr>
    vm_to_bkp  = next(protectable_item for protectable_item in protectable_items if container_name.lower() in protectable_item.name.lower()).properties
  File "/home/gabrigr/.local/lib/python3.6/site-packages/msrest/paging.py", line 109, in __next__
    self.advance_page()
  File "/home/gabrigr/.local/lib/python3.6/site-packages/msrest/paging.py", line 95, in advance_page
    self._response = self._get_next(self.next_link)
  File "/home/gabrigr/.local/lib/python3.6/site-packages/azure/mgmt/recoveryservicesbackup/operations/backup_protectable_items_operations.py", line 107, in internal_paging
    raise exp
msrestazure.azure_exceptions.CloudError: Azure Error: BMSUserErrorInvalidInput
Message: Input provided for the call is invalid
Please check the required inputs
@lmazuel
Copy link
Member

lmazuel commented Sep 8, 2017

@DheerendraRathor, what do you think?

@lmazuel lmazuel added ARM question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 8, 2017
@DheerendraRathor
Copy link
Contributor

DheerendraRathor commented Sep 8, 2017

@ecgg Can you give me request id for debugging purpose? It is present in raised exception. You can add try except block around list protectable item code and request id is present in exception as exp.request_id where exp is an instance of CloudError.

@ecgg
Copy link
Author

ecgg commented Sep 8, 2017

Here's what I did

    try:

        protectable_items = recovery_client.backup_protectable_items.list(bkp_vlt, config['Backup']['ResourceGroup'], raw=True)

    # find protectable items and see if one matched request vm
        vm_to_bkp  = next(protectable_item for protectable_item in protectable_items if container_name.lower() in protectable_item.name.lower()).properties

    except CloudError as err:
        logging.info(err.message)
        print(err.request_id)

And here's the output:

2017-09-08 22:34:49,359 Input provided for the call is invalid
Please check the required inputs
0a3648cf-2d70-472f-a1f2-84f8652ce351

@DheerendraRathor
Copy link
Contributor

@ecgg
Please use list call as per following code:

iaasvm_odata_filter = "backupManagementType eq 'AzureIaasVM'"
protectable_items = client.backup_protectable_items.list(bkp_vlt, config['Backup']['ResourceGroup'], filter=iaasvm_odata_filter, raw=True)    

These filters were introduced due to recent service side changes. I'll update tests and SDK to incorporate these soon.

@ecgg
Copy link
Author

ecgg commented Sep 11, 2017

That worked - thank you

@ecgg ecgg closed this as completed Sep 11, 2017
DheerendraRathor added a commit to DheerendraRathor/azure-sdk-for-python that referenced this issue Oct 19, 2017
- Included changes to address issue Azure#1422
- Updated e2e test to include resource group and vault creation
- Minor refactoring in tests (removed unused imports, PEP8 comment corrections)
DheerendraRathor added a commit to DheerendraRathor/azure-sdk-for-net that referenced this issue Oct 29, 2017
- Updated tests to address Azure/azure-sdk-for-python#1422
- Updated test settings (VM name etc) for Backup tests and re-recorded
tests
shahabhijeet pushed a commit to Azure/azure-sdk-for-net that referenced this issue Nov 1, 2017
- Updated tests to address Azure/azure-sdk-for-python#1422
- Updated test settings (VM name etc) for Backup tests and re-recorded
tests
shahabhijeet added a commit to Azure/azure-sdk-for-net that referenced this issue Nov 2, 2017
* Regenerate SDK for new added api key management swagger spec (#3767)

* Generate .NET SDK for application insights

* update assembly version

* address code review feedback

* address code review feedback

* regenerate sdk for adding management api keys functions

* remove local used LaunchSettings.json file

* generate from the pulic swagger

* increase version in csproj file

* Update Batch changelog to have a clearer format (#3775)

* Removing build tools outside of branches (#3780)

* Moving old files which are not used anymore to legacy directory

* Separate build tools from branch. Moving forward build tools will be downloaded from a central location, this helps in propogating build changes to any branch dynamically. After this change build process on a new machine or fresh install will be a two step process. First download the build tools by executing msbuild build.proj and once it finishes, then execute whatever target you need to do e.g. msbuild build.proj /t:RunTests /p:Scope=SDKs\Compute. After downloading all build related assets will be downloaded under <root>\tools\SdkBuildTools. Moving bunch of legacy code to legacy directory. Removing build tasks out of this branch, currently being moved to legacy directory

* Update README.md

Updating readme to document recent build changes that were done to extract build tools out of main branch.

* Adding data factory CRUD scenario test (#3774)

* This is the first batch of scenario tests for the ADF V2 SDK.
  * Partially addresses #3726; more tests need to be added

* Update Batch supporting assemblies (#3794)

* [ADLA] - Update changelog for version 3.0.2 (#3792)

* Merge from private Networking (#3771)

* Regenerated Networking SDK on 2017-09-01, private

* Expose new operation for VpnDeviceConfiguration for Vpn Gateways

* Adding AzureReachabilityReport and AvailableProvidersList APIs + tests

* Updating version of Network SDK

* Disabling tests for AzureReachabilityReport and AvailableProvidersList APIs

* Updated version

* Caa record support in Azure DNS (#3785)

* upgrade .net.test.sk project to stable version

* support for CAA records

* changing assembly file version to reflect nuget version

* update swagger from public repo

* addressing code review comments

* bumping up assembly verson to 2.0.0.0

* [ADLA - ADLS] - [HOTFIX] - Update changelog (#3802)

* [ADLA] - Update changelog for version 3.0.2

* [ADLA] - Update changelog

* [ADLS] - Update changelog

* Update changelog

* 3.0.1 for ADLA was never published to nuget

* 2.2.1 for ADLS was never published to nuget

* Adding .NET SDK changes for Server DNS Aliasing (#3803)

* Auto generated files for .NET SDK for Server DNS Aliasing. Also contains removing unused declarations from bunch of files. Everything generated automatically

* Adding tests for server dns aliasing and their recording

* Fixing sql_resource_manager.txt

* Updating new version of SDK in AssemblyInfo.cs and csproj file

* Small cosmetic changes to address Jared

* Revert "Small cosmetic changes to address Jared"

This reverts commit 5a5e426.

* Reverting version change in project and AssemblyInfo files; addressing small change requests from Jared in pull request

* [ACR] Update SDK to 2017-10-01 version (#3778)

* Update ACR SDK to 2017-10-01 version

* Update csproj, re-record tests

* Address PR review feedback

Address PR review feedback

* Fix issue with missing Unit enumeration values, fix documentation issues, improved tests for multi-dim metrics API (#3809)

* [Monitor] Fixing doc issues, adding two values to the metric unit enumeration, generating metadata files

* Increasing version number due to a bug fix and documentation updates

* [Monitor] Adding multi-dimensional metrics tests

* Re-generate SDKs/Resource (#3793)

* Updated Network SDK version (#3814)

* Added Zone Redundant Property To Database, Elastic Pool and Edition Capability (#3800)

* Add zone redundant property for database, elastic pool and capability edition

* Added zone redundant property release notes

* Revert "Removing build tools outside of branches (#3780)"

This reverts commit deceaf3.

* Revert "Revert "Removing build tools outside of branches (#3780)""

This reverts commit 58265b9.

* Rerun tests to fix validation errors

* Remove null capability test

* Cancel pipeline run (#3812)

* Cancel pipeline run api

* Makin cancel run to factory operation

* Example and unit test for cancel pipeline run api.

* Regenerating SDK accoring to latest instructions

* Scenario test for cancel run api

* Scenario test for pipeline run 2

* Regenerating SDK and adding text file with generation metadata

* Adding version 0.2.1

* Merged ADMS changes for Oct. SDK release

* Add linked service scenario test (resolves #3726) (#3798)

* Adds a simple CRUD test for linked services
  * Also change all tests to check for proper HTTP response codes on
    each API call
  * Resolves #3726

* Updated RecoveryServices.Backup Tests (#3822)

- Updated tests to address Azure/azure-sdk-for-python#1422
- Updated test settings (VM name etc) for Backup tests and re-recorded
tests
@bsiegel bsiegel added the Service Attention Workflow: This issue is responsible by Azure service team. label Sep 26, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ARM question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants