Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Diagnostics Collection as a part of Test

John Haskin edited this page Mar 14, 2019 · 10 revisions

**THESE PAGES HAVE BEEN DEPRECATED **

PLEASE REFER TO https://docs.microsoft.com/en-us/azure/azure-stack/partner/

When a test executes and finishes, test logs are uploaded to a VaaS store. At times, to root cause an issue, we also need to analyze product logs. In order to enable this, there are tasks that you need to complete to ensure these logs are accessed in a controlled manner. These steps walk through how to provision and set access policies on an Azure storage account and where to specify the storage account in the VaaS portal.

Note that product logs will always be uploaded into the storage account that you create and manage.

Provision a blob storage account

To create a storage account, follow the instructions in the "Create a storage account" section ONLY in this link.

Make sure to select the Blob storage storage account type.

Generating SAS connection string for Blob Service

  1. Navigate to the storage account created above and select it.
  2. On the blade under Settings, click on Shared access signature.
  3. Check only "Blob" from Allowed Services options (uncheck remaining).
  4. Check "Service", "Container" and "Object" from Allowed resource types.
  5. Check "Read", "Write", "List", "Add", "Create" from Allowed permissions.
  6. Set Start time to the current time, and End time to 3 months from the current time.
  7. Click on "Generate SAS" and save the "Blob service SAS URL" string as is (do not add container names).

Note that SAS URL expires at the End time set when the URL was generated. Ensure that the URL is sufficiently valid before sharing it with product team for debugging, or that the URL is valid for more than 30 days when scheduling tests.

Providing the Blob service SAS URL to tests

Case 1: Workflow-level common parameters

The value of the Diagnostics connection string common parameter will be stored by the service and provided at schedule time to all tests in the workflow that use this parameter. When the SAS URL is within 30 days of expiry, you will be prompted for a new SAS URL on the common parameters page.

  1. Start any new workflow, or edit the common parameters of an existing workflow.
  2. Under Common Test Parameters, enter the blob service SAS URL in the Diagnostics connection string field.
  3. The URL will be saved upon clicking Submit.

Case 2: Individual test parameters

Typically, you should not need to supply a connection string to an individual test. In the context of test parameters, the connection string is represented by the DiagnosticsStorageConnection parameter.

One exception includes rescheduling a test in a Test Pass workflow from the tests summary page:

  1. Enter the blob service SAS URL in the DiagnosticsStorageConnection field.
  2. Click Submit to reschedule the test.

Otherwise, depending on a particular test definition, the test may require you to enter a value independently of the common parameters, or may allow you to override the common parameter value.

  • For Test Pass workflows:
    1. When selecting tests to schedule, click the Edit link and enter the blob service SAS URL in the DiagnosticsStorageConnection field.
    2. Click Save and proceed. The test will be scheduled on Submit.
  • For Solution Validation and Package Validation workflows:
    1. When scheduling tests from the tests summary page, enter the blob service SAS URL in the DiagnosticsStorageConnection field.
    2. Click Submit to schedule the test.
Clone this wiki locally