Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.27k stars 3.87k forks source link

Unable to establish Global Reach with Set-AzExpressRouteCircuit -ExpressRouteCircuit $ckt1 #11026

Open Zsoldier opened 4 years ago

Zsoldier commented 4 years ago

Description

Unable to establish global reach using powershell az module anymore. azure-cli method works fine. No error returned, simply the unmodified circuit information is returned.

Steps to reproduce

Get-AzSubscription -SubscriptionId $peersubid | Set-AzContext
$ckt2 = Get-AzExpressRouteCircuit -name $PeerExpressRoute -ResourceGroupName $PeerERResourceGroup
If($ckt2){$AuthKey = ($ckt2.Authorizations | Where-Object {$_.Name -eq $AuthKeyName}).AuthorizationKey}
Get-AzSubscription -SubscriptionId $subid | Set-AzContext
$ckt1 = Get-AzExpressRouteCircuit -name $ERCircuitName -ResourceGroupName $ERResourceGroup
$ckt2privpeer = ($ckt2.peerings | Where-Object {$_.Name -eq "AzurePrivatePeering"})
Add-AzExpressRouteCircuitConnectionConfig `
-Name $GRName `
-ExpressRouteCircuit $ckt1 `
-PeerExpressRouteCircuitPeering $ckt2privpeer.id `
-AddressPrefix $GRAddressPrefix `
-AuthorizationKey $AuthKey

Set-AzExpressRouteCircuit -ExpressRouteCircuit $ckt1

Environment data

Name                           Value
----                           -----
PSVersion                      6.2.4
PSEdition                      Core
GitCommitId                    6.2.4
OS                             Darwin 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

    Directory: /Users/cnakagaki/.local/share/powershell/Modules

ModuleType Version    Name                                PSEdition ExportedCom
                                                                    mands
---------- -------    ----                                --------- -----------
Script     3.3.0      Az                                  Core,Desk 
Script     1.7.0      Az.Accounts                         Core,Desk {Disable-A…
Script     1.1.1      Az.Advisor                          Core,Desk {Get-AzAdv…
Script     1.0.3      Az.Aks                              Core,Desk {Get-AzAks…
Script     1.1.2      Az.AnalysisServices                 Core,Desk {Resume-Az…
Script     1.3.3      Az.ApiManagement                    Core,Desk {Add-AzApi…
Script     1.0.3      Az.ApplicationInsights              Core,Desk {Get-AzApp…
Script     1.3.5      Az.Automation                       Core,Desk {Get-AzAut…
Script     2.0.2      Az.Batch                            Core,Desk {Remove-Az…
Script     1.0.2      Az.Billing                          Core,Desk {Get-AzBil…
Script     1.4.2      Az.Cdn                              Core,Desk {Get-AzCdn…
Script     1.2.2      Az.CognitiveServices                Core,Desk {Get-AzCog…
Script     3.3.0      Az.Compute                          Core,Desk {Remove-Az…
Script     1.0.3      Az.ContainerInstance                Core,Desk {New-AzCon…
Script     1.1.1      Az.ContainerRegistry                Core,Desk {New-AzCon…
Script     1.1.0      Az.DataBoxEdge                      Core,Desk {Get-AzDat…
Script     1.6.0      Az.DataFactory                      Core,Desk {Set-AzDat…
Script     1.0.2      Az.DataLakeAnalytics                Core,Desk {Get-AzDat…
Script     1.2.6      Az.DataLakeStore                    Core,Desk {Get-AzDat…
Script     1.0.2      Az.DeploymentManager                Core,Desk {Get-AzDep…
Script     1.0.2      Az.DevTestLabs                      Core,Desk {Get-AzDtl…
Script     1.1.2      Az.Dns                              Core,Desk {Get-AzDns…
Script     1.2.3      Az.EventGrid                        Core,Desk {New-AzEve…
Script     1.4.3      Az.EventHub                         Core,Desk {New-AzEve…
Script     1.3.0      Az.FrontDoor                        Core,Desk {New-AzFro…
Script     3.0.2      Az.HDInsight                        Core,Desk {Get-AzHDI…
Script     1.0.1      Az.HealthcareApis                   Core,Desk {New-AzHea…
Script     2.0.1      Az.IotHub                           Core,Desk {Add-AzIot…
Script     1.4.0      Az.KeyVault                         Core,Desk {Add-AzKey…
Script     1.3.2      Az.LogicApp                         Core,Desk {Get-AzInt…
Script     1.1.3      Az.MachineLearning                  Core,Desk {Move-AzMl…
Script     1.0.2      Az.ManagedServices                  Core,Desk {Get-AzMan…
Script     1.0.2      Az.MarketplaceOrdering              Core,Desk {Get-AzMar…
Script     1.1.1      Az.Media                            Core,Desk {Sync-AzMe…
Script     1.5.0      Az.Monitor                          Core,Desk {Get-AzMet…
Script     2.2.1      Az.Network                          Core,Desk {Add-AzApp…
Script     1.1.1      Az.NotificationHubs                 Core,Desk {Get-AzNot…
Script     1.3.4      Az.OperationalInsights              Core,Desk {New-AzOpe…
Script     1.1.4      Az.PolicyInsights                   Core,Desk {Get-AzPol…
Script     1.1.1      Az.PowerBIEmbedded                  Core,Desk {Remove-Az…
Script     1.0.2      Az.PrivateDns                       Core,Desk {Get-AzPri…
Script     2.4.0      Az.RecoveryServices                 Core,Desk {Get-AzRec…
Script     1.2.1      Az.RedisCache                       Core,Desk {Remove-Az…
Script     1.0.3      Az.Relay                            Core,Desk {New-AzRel…
Script     1.9.1      Az.Resources                        Core,Desk {Get-AzPro…
Script     1.4.1      Az.ServiceBus                       Core,Desk {New-AzSer…
Script     2.0.1      Az.ServiceFabric                    Core,Desk {Add-AzSer…
Script     1.1.1      Az.SignalR                          Core,Desk {New-AzSig…
Script     2.1.2      Az.Sql                              Core,Desk {Get-AzSql…
Script     1.0.2      Az.SqlVirtualMachine                Core,Desk {New-AzSql…
Script     1.11.0     Az.Storage                          Core,Desk {Get-AzSto…
Script     1.2.2      Az.StorageSync                      Core,Desk {Invoke-Az…
Script     1.0.1      Az.StreamAnalytics                  Core,Desk {Get-AzStr…
Script     1.0.3      Az.TrafficManager                   Core,Desk {Add-AzTra…
Script     1.5.1      Az.Websites                         Core,Desk {Get-AzApp…
Script     6.7.0.112… VMware.DeployAutomation             Desk      {Add-Deplo…
Script     6.7.0.112… VMware.ImageBuilder                 Desk      {Add-EsxSo…
Manifest   11.5.0.14… VMware.PowerCLI                     Desk      
Script     6.7.0.148… VMware.Vim                          Desk      
Script     11.5.0.14… VMware.VimAutomation.Cis.Core       Desk      {Connect-C…
Script     11.0.0.10… VMware.VimAutomation.Cloud          Desk      {Add-CIDat…
Script     11.5.0.14… VMware.VimAutomation.Common         Desk      {Get-Task,…
Script     11.5.0.14… VMware.VimAutomation.Core           Desk      {Add-Passt…
Script     11.5.0.14… VMware.VimAutomation.Hcx            Desk      {Connect-H…
Script     7.10.0.14… VMware.VimAutomation.HorizonView    Desk      {Connect-H…
Script     11.3.0.13… VMware.VimAutomation.License        Desk      Get-Licens…
Script     11.5.0.14… VMware.VimAutomation.Nsxt           Desk      {Connect-N…
Script     11.5.0.14… VMware.VimAutomation.Sdk            Desk      {Get-Error…
Script     11.0.0.10… VMware.VimAutomation.Security       Desk      {Get-Secur…
Script     11.5.0.14… VMware.VimAutomation.Srm            Desk      {Connect-S…
Script     11.5.0.14… VMware.VimAutomation.Storage        Desk      {Add-KeyMa…
Script     1.3.0.0    VMware.VimAutomation.StorageUtility Desk      Update-Vmf…
Script     11.2.0.12… VMware.VimAutomation.Vds            Desk      {Add-VDSwi…
Script     11.5.0.14… VMware.VimAutomation.Vmc            Desk      {Add-VmcSd…
Script     10.0.0.78… VMware.VimAutomation.vROps          Desk      {Connect-O…
Script     6.5.1.786… VMware.VumAutomation                Desk      {Add-Entit…

    Directory: /usr/local/microsoft/powershell/6/Modules

ModuleType Version    Name                                PSEdition ExportedCom
                                                                    mands
---------- -------    ----                                --------- -----------
Manifest   1.2.3.0    Microsoft.PowerShell.Archive        Desk      {Compress-…
Manifest   6.1.0.0    Microsoft.PowerShell.Host           Core      {Start-Tra…
Manifest   6.1.0.0    Microsoft.PowerShell.Management     Core      {Add-Conte…
Manifest   6.1.0.0    Microsoft.PowerShell.Security       Core      {Get-Crede…
Manifest   6.1.0.0    Microsoft.PowerShell.Utility        Core      {Export-Al…
Script     1.3.2      PackageManagement                   Desk      {Find-Pack…
Script     2.1.3      PowerShellGet                       Desk      {Find-Comm…
Script     0.0        PSDesiredStateConfiguration         Desk      {ValidateN…
Script     2.0.0      PSReadLine                          Desk      {Get-PSRea…
Binary     1.1.2      ThreadJob                           Desk      Start-Thre…

Debug output

Error output

dingmeng-xue commented 4 years ago

@Zsoldier , is there any error? Please set $DebugPreference = "Continue" and share output around error cmdlet.

Zsoldier commented 4 years ago

@dingmeng-xue Looks like it's not passing my modified $ckt1 object in the PUT call.

DEBUG: 2:55:05 PM - GetAzureExpressRouteCircuitCommand end processing.
PS /usr/local/bin> $ckt2privpeer = ($ckt2.peerings | Where-Object {$_.Name -eq "AzurePrivatePeering"})
PS /usr/local/bin> Add-AzExpressRouteCircuitConnectionConfig `
>> -Name $GRName `
>> -ExpressRouteCircuit $ckt1 `
>> -PeerExpressRouteCircuitPeering $ckt2privpeer.id `
>> -AddressPrefix $GRAddressPrefix `
>> -AuthorizationKey $AuthKey
DEBUG: 2:55:05 PM - AddAzureExpressRouteCircuitConnectionConfigCommand begin processing with ParameterSet 'SetByResourceId'.
DEBUG: 2:55:05 PM - using account id 'Chris.Nakagaki'...
WARNING: Breaking changes in the cmdlet 'Add-AzExpressRouteCircuitConnectionConfig' :
WARNING:  - "The output type 'Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit' is changing"
 - The following properties in the output type are being deprecated :
 'AllowGlobalReach'

WARNING: NOTE : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.

Name                             : xxx-er
ResourceGroupName                : xxx
Location                         : westus
Id                               : /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx
Etag                             : W/“xxx”
ProvisioningState                : Succeeded
Sku                              : {
                                     "Name": "Standard_MeteredData",
                                     "Tier": "Standard",
                                     "Family": "MeteredData"
                                   }
CircuitProvisioningState         : Enabled
ServiceProviderProvisioningState : Provisioned
ServiceProviderNotes             : 
ServiceProviderProperties        : {
                                     "ServiceProviderName": "VMware Virtustream",
                                     "PeeringLocation": "Silicon Valley VMWARE01",
                                     "BandwidthInMbps": 50
                                   }
ExpressRoutePort                 : null
BandwidthInGbps                  : 
Stag                             : 11
ServiceKey                       : xxx
Peerings                         : [
                                     {
                                       "Name": "AzurePrivatePeering",
                                       "Etag": “W/\”xxx\””,
                                       "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/Azur
                                   ePrivatePeering",
                                       "PeeringType": "AzurePrivatePeering",
                                       "State": "Enabled",
                                       "AzureASN": 12076,
                                       "PeerASN": 65000,
                                       "PrimaryPeerAddressPrefix": "10.142.3.8/30",
                                       "SecondaryPeerAddressPrefix": "10.142.3.12/30",
                                       "PrimaryAzurePort": "",
                                       "SecondaryAzurePort": "",
                                       "VlanId": 1740,
                                       "ProvisioningState": "Succeeded",
                                       "GatewayManagerEtag": "",
                                       "LastModifiedBy": "Customer",
                                       "Connections": [
                                         {
                                           "Name": "xxx",
                                           "AddressPrefix": "10.142.3.24/29",
                                           "AuthorizationKey": "xxx",
                                           "ExpressRouteCircuitPeering": {
                                             "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peering
                                   s/AzurePrivatePeering"
                                           },
                                           "PeerExpressRouteCircuitPeering": {
                                             "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peering
                                   s/AzurePrivatePeering"
                                           }
                                         }
                                       ],
                                       "PeeredConnections": []
                                     }
                                   ]
Authorizations                   : [
                                     {
                                       "Name": "TNT40-SNTC",
                                       "Etag": “W/\”xxx\””,
                                       "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/authorization
                                   s/TNT40-SNTC",
                                       "AuthorizationKey": "xxx",
                                       "AuthorizationUseStatus": "Available",
                                       "ProvisioningState": "Succeeded"
                                     }
                                   ]
AllowClassicOperations           : False
GatewayManagerEtag               : 

DEBUG: AzureQoSEvent: CommandName - Add-AzExpressRouteCircuitConnectionConfig; IsSuccess - True; Duration - 00:00:00.0050037; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 2:55:05 PM - AddAzureExpressRouteCircuitConnectionConfigCommand end processing.
DEBUG: 2:55:05 PM - AddAzureExpressRouteCircuitConnectionConfigCommand end processing.

PS /usr/local/bin> 
PS /usr/local/bin> Set-AzExpressRouteCircuit -ExpressRouteCircuit $ckt1
DEBUG: 2:55:09 PM - SetAzureExpressRouteCircuitCommand begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 2:55:09 PM - using account id 'chris.nakagaki'...
WARNING: Breaking changes in the cmdlet 'Set-AzExpressRouteCircuit' :
WARNING:  - "The output type 'Microsoft.Azure.Commands.Network.Models.PSExpressRouteCircuit' is changing"
 - The following properties in the output type are being deprecated :
 'AllowGlobalReach'

WARNING: NOTE : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.
DEBUG: [Common.Authentication]: Authenticating using Account: 'chris.nakagaki', environment: 'AzureCloud', tenant: '945c199a-83a2-4e80-9f8c-5a91be5752dd'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: '945c199a-83a2-4e80-9f8c-5a91be5752dd', Endpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/945c199a-83a2-4e80-9f8c-5a91be5752dd/', CorrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '945c199a-83a2-4e80-9f8c-5a91be5752dd', AdEndpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0688320Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: ADAL PCL.CoreCLR with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0689780Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: ADAL PCL.CoreCLR with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0691560Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: === Token Acquisition started: 
    CacheType: null
    Authentication Target: User
    , Authority Host: login.microsoftonline.com

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0692800Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: === Token Acquisition started:
    Authority: https://login.microsoftonline.com/945c199a-83a2-4e80-9f8c-5a91be5752dd/
    Resource: https://management.core.windows.net/
    ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
    CacheType: null
    Authentication Target: User

DEBUG: [ADAL]: Verbose: 2020-02-04T19:55:09.0694230Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: Loading from cache.

DEBUG: [ADAL]: Verbose: 2020-02-04T19:55:09.0695190Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: Loading from cache.

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0726120Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 4 items to token cache.

DEBUG: [ADAL]: Verbose: 2020-02-04T19:55:09.0727400Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Verbose: 2020-02-04T19:55:09.0727930Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0728560Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: An item matching the requested resource was found in the cache

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0729070Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: An item matching the requested resource was found in the cache

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0729640Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: 55.6516673333333 minutes left until token in cache expires

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0730090Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: 55.6516673333333 minutes left until token in cache expires

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0730510Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0730950Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0731650Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 2/4/20 8:50:48 PM +00:00

DEBUG: [ADAL]: Information: 2020-02-04T19:55:09.0732120Z: 7b390644-ea51-4614-bc3b-d2d1d2bf092e - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 2/4/20 8:50:48 PM +00:00Access Token Hash: Hx8kKSGiUkBrenw6Cg2C7cWBfgn5gYxjhb2Ds+I3VjU=
     User id: 2a2c4d92-f904-4155-9d61-8b0449d16b53

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '02/04/2020 20:50:48 +00:00', MultipleResource? 'True', Tenant: '945c199a-83a2-4e80-9f8c-5a91be5752dd', UserId: 'chris.nakagaki'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'chris.nakagaki', Name: Chris Nakagaki, IdProvider: 'https://sts.windows.net/945c199a-83a2-4e80-9f8c-5a91be5752dd/', Uid: '2a2c4d92-f904-4155-9d61-8b0449d16b53'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '02/04/2020 20:50:48 +00:00' Comparing to '02/04/2020 19:55:09 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:55:39.0992140'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er?api-version=2019-09-01

Headers:
x-ms-client-request-id        : 6253e52a-6100-4a41-bfdc-a950e4ad1b33
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-request-id               : 435e709b-dfc4-46cd-98b5-e680063470fb
x-ms-correlation-request-id   : 42133f7a-1e38-4388-a1cd-71174d86f24c
x-ms-arm-service-request-id   : 9ef9a253-d939-40cc-be9f-33780ef5a868
Strict-Transport-Security     : max-age=31536000; includeSubDomains
Server                        : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-routing-request-id       : CENTRALUS:20200204T195510Z:42133f7a-1e38-4388-a1cd-71174d86f24c
X-Content-Type-Options        : nosniff
Date                          : Tue, 04 Feb 2020 19:55:10 GMT

Body:
{
  "name": "xxx-er",
  "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er",
  "etag": "W/\"196c0a21-376f-447b-824e-af34338db506\"",
  "type": "Microsoft.Network/expressRouteCircuits",
  "location": "westus",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceGuid": "xxx",
    "peerings": [
      {
        "name": "AzurePrivatePeering",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/AzurePrivatePeering",
        "etag": "W/\"196c0a21-376f-447b-824e-af34338db506\"",
        "properties": {
          "provisioningState": "Succeeded",
          "peeringType": "AzurePrivatePeering",
          "azureASN": 12076,
          "peerASN": 65000,
          "primaryPeerAddressPrefix": "10.142.3.8/30",
          "secondaryPeerAddressPrefix": "10.142.3.12/30",
          "primaryAzurePort": "",
          "secondaryAzurePort": "",
          "state": "Enabled",
          "vlanId": 1740,
          "gatewayManagerEtag": "",
          "lastModifiedBy": "Customer",
          "connections": [],
          "peeredConnections": []
        },
        "type": "Microsoft.Network/expressRouteCircuits/peerings"
      }
    ],
    "authorizations": [
      {
        "name": "TNT40-SNTC",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/authorizations/TNT40-SNTC",
        "etag": "W/\"196c0a21-376f-447b-824e-af34338db506\"",
        "properties": {
          "provisioningState": "Succeeded",
          "authorizationKey": "xxx",
          "authorizationUseStatus": "Available"
        },
        "type": "Microsoft.Network/expressRouteCircuits/authorizations"
      }
    ],
    "serviceProviderProperties": {
      "serviceProviderName": “xxx”,
      "peeringLocation": “xxx”,
      "bandwidthInMbps": 50
    },
    "circuitProvisioningState": "Enabled",
    "allowClassicOperations": false,
    "gatewayManagerEtag": "",
    "serviceKey": "xxx",
    "serviceProviderProvisioningState": "Provisioned",
    "allowGlobalReach": false,
    "globalReachEnabled": false,
    "stag": 11
  },
  "sku": {
    "name": "Standard_MeteredData",
    "tier": "Standard",
    "family": "MeteredData"
  }
}

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '02/04/2020 20:50:48 +00:00', MultipleResource? 'True', Tenant: '945c199a-83a2-4e80-9f8c-5a91be5752dd', UserId: 'chris.nakagaki'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'chris.nakagaki', Name: Chris Nakagaki, IdProvider: 'https://sts.windows.net/945c199a-83a2-4e80-9f8c-5a91be5752dd/', Uid: '2a2c4d92-f904-4155-9d61-8b0449d16b53'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '02/04/2020 20:50:48 +00:00' Comparing to '02/04/2020 19:55:10 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:55:37.3946160'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er?api-version=2019-09-01

Headers:
x-ms-client-request-id        : e48d451c-0625-432f-a9e4-f7e6bb778b85
Accept-Language               : en-US

Body:
{
  "sku": {
    "name": "Standard_MeteredData",
    "tier": "Standard",
    "family": "MeteredData"
  },
  "properties": {
    "allowClassicOperations": false,
    "authorizations": [
      {
        "name": "TNT40-SNTC",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/authorizations/TNT40-SNTC"
      }
    ],
    "peerings": [
      {
        "properties": {
          "peeringType": "AzurePrivatePeering",
          "state": "Enabled",
          "peerASN": 65000,
          "primaryPeerAddressPrefix": "10.142.3.8/30",
          "secondaryPeerAddressPrefix": "10.142.3.12/30",
          "vlanId": 1740,
          "gatewayManagerEtag": ""
        },
        "name": "AzurePrivatePeering",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/AzurePrivatePeering"
      }
    ],
    "serviceProviderProperties": {
      "serviceProviderName": "VMware Virtustream",
      "peeringLocation": "Silicon Valley VMWARE01",
      "bandwidthInMbps": 50
    },
    "gatewayManagerEtag": ""
  },
  "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er",
  "location": "westus"
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-request-id               : 25ef55d7-685d-45d9-8c44-5c911824fbc8
Azure-AsyncOperation          : https://management.azure.com/subscriptions/xxx/providers/Microsoft.Network/locations/westus/operations/25ef55d7-685d-45d9-8c44-5c911824fbc8?api-version=2019-09-01
x-ms-correlation-request-id   : 191264a4-0310-4c9c-95d1-1b04806bbbef
x-ms-arm-service-request-id   : 51fbbfa4-7323-40ce-aa69-333a2a0b81ef
Strict-Transport-Security     : max-age=31536000; includeSubDomains
Server                        : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-routing-request-id       : CENTRALUS:20200204T195510Z:191264a4-0310-4c9c-95d1-1b04806bbbef
X-Content-Type-Options        : nosniff
Date                          : Tue, 04 Feb 2020 19:55:10 GMT

Body:
{
  "name": "xxx-er",
  "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er",
  "etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
  "type": "Microsoft.Network/expressRouteCircuits",
  "location": "westus",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceGuid": "xxx",
    "peerings": [
      {
        "name": "AzurePrivatePeering",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/AzurePrivatePeering",
        "etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
        "properties": {
          "provisioningState": "Succeeded",
          "peeringType": "AzurePrivatePeering",
          "azureASN": 12076,
          "peerASN": 65000,
          "primaryPeerAddressPrefix": "10.142.3.8/30",
          "secondaryPeerAddressPrefix": "10.142.3.12/30",
          "primaryAzurePort": "VMWAREVS-EXR03-BY30-PRI-A",
          "secondaryAzurePort": "VMWAREVS-EXR04-BY30-SEC-A",
          "state": "Enabled",
          "vlanId": 1740,
          "gatewayManagerEtag": "",
          "lastModifiedBy": "Customer",
          "connections": [],
          "peeredConnections": []
        },
        "type": "Microsoft.Network/expressRouteCircuits/peerings"
      }
    ],
    "authorizations": [
      {
        "name": "TNT40-SNTC",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/authorizations/TNT40-SNTC",
        "etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
        "properties": {
          "provisioningState": "Succeeded",
          "authorizationKey": "xxx",
          "authorizationUseStatus": "Available"
        },
        "type": "Microsoft.Network/expressRouteCircuits/authorizations"
      }
    ],
    "serviceProviderProperties": {
      "serviceProviderName": "VMware Virtustream",
      "peeringLocation": "Silicon Valley VMWARE01",
      "bandwidthInMbps": 50
    },
    "circuitProvisioningState": "Enabled",
    "allowClassicOperations": false,
    "gatewayManagerEtag": "",
    "serviceKey": "xxx",
    "serviceProviderProvisioningState": "Provisioned",
    "allowGlobalReach": false,
    "globalReachEnabled": true,
    "stag": 11
  },
  "sku": {
    "name": "Standard_MeteredData",
    "tier": "Standard",
    "family": "MeteredData"
  }
}

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '02/04/2020 20:50:48 +00:00', MultipleResource? 'True', Tenant: '945c199a-83a2-4e80-9f8c-5a91be5752dd', UserId: 'chris.nakagaki'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'chris.nakagaki', Name: Chris Nakagaki, IdProvider: 'https://sts.windows.net/945c199a-83a2-4e80-9f8c-5a91be5752dd/', Uid: '2a2c4d92-f904-4155-9d61-8b0449d16b53'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '02/04/2020 20:50:48 +00:00' Comparing to '02/04/2020 19:55:11 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:55:37.1645210'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er?api-version=2019-09-01

Headers:

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-request-id               : 973dc4ea-cc47-44e2-bdd9-e6220314d55f
x-ms-correlation-request-id   : 817da84a-5a55-4196-b4a6-e14f3b6e6679
x-ms-arm-service-request-id   : 3addb5ba-3926-4bca-abf6-754361171913
Strict-Transport-Security     : max-age=31536000; includeSubDomains
Server                        : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-routing-request-id       : CENTRALUS:20200204T195511Z:817da84a-5a55-4196-b4a6-e14f3b6e6679
X-Content-Type-Options        : nosniff
Date                          : Tue, 04 Feb 2020 19:55:11 GMT

Body:
{
  "name": "xxx-er",
  "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er",
  "etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
  "type": "Microsoft.Network/expressRouteCircuits",
  "location": "westus",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceGuid": "xxx",
    "peerings": [
      {
        "name": "AzurePrivatePeering",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/AzurePrivatePeering",
        "etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
        "properties": {
          "provisioningState": "Succeeded",
          "peeringType": "AzurePrivatePeering",
          "azureASN": 12076,
          "peerASN": 65000,
          "primaryPeerAddressPrefix": "10.142.3.8/30",
          "secondaryPeerAddressPrefix": "10.142.3.12/30",
          "primaryAzurePort": "",
          "secondaryAzurePort": "",
          "state": "Enabled",
          "vlanId": 1740,
          "gatewayManagerEtag": "",
          "lastModifiedBy": "Customer",
          "connections": [],
          "peeredConnections": []
        },
        "type": "Microsoft.Network/expressRouteCircuits/peerings"
      }
    ],
    "authorizations": [
      {
        "name": "TNT40-SNTC",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/authorizations/TNT40-SNTC",
        "etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
        "properties": {
          "provisioningState": "Succeeded",
          "authorizationKey": "xxx",
          "authorizationUseStatus": "Available"
        },
        "type": "Microsoft.Network/expressRouteCircuits/authorizations"
      }
    ],
    "serviceProviderProperties": {
      "serviceProviderName": "VMware Virtustream",
      "peeringLocation": "Silicon Valley VMWARE01",
      "bandwidthInMbps": 50
    },
    "circuitProvisioningState": "Enabled",
    "allowClassicOperations": false,
    "gatewayManagerEtag": "",
    "serviceKey": "xxx",
    "serviceProviderProvisioningState": "Provisioned",
    "allowGlobalReach": false,
    "globalReachEnabled": false,
    "stag": 11
  },
  "sku": {
    "name": "Standard_MeteredData",
    "tier": "Standard",
    "family": "MeteredData"
  }
}

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '02/04/2020 20:50:48 +00:00', MultipleResource? 'True', Tenant: '945c199a-83a2-4e80-9f8c-5a91be5752dd', UserId: 'chris.nakagaki'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'chris.nakagaki', Name: Chris Nakagaki, IdProvider: 'https://sts.windows.net/945c199a-83a2-4e80-9f8c-5a91be5752dd/', Uid: '2a2c4d92-f904-4155-9d61-8b0449d16b53'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '02/04/2020 20:50:48 +00:00' Comparing to '02/04/2020 19:55:11 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:55:36.3499660'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er?api-version=2019-09-01

Headers:
x-ms-client-request-id        : 0a9e2c1b-6e97-4ce4-96f0-fe3be1408dc9
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-request-id               : af45309c-6a71-45ab-90c5-c0573c50015a
x-ms-correlation-request-id   : 1db631bd-994c-4ae9-8ac9-b9e0af1be0df
x-ms-arm-service-request-id   : 9110159a-ebc9-4196-a9bf-9c056abb5a1c
Strict-Transport-Security     : max-age=31536000; includeSubDomains
Server                        : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11997
x-ms-routing-request-id       : CENTRALUS:20200204T195512Z:1db631bd-994c-4ae9-8ac9-b9e0af1be0df
X-Content-Type-Options        : nosniff
Date                          : Tue, 04 Feb 2020 19:55:11 GMT

Body:
{
  "name": "xxx-er",
  "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er",
  "etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
  "type": "Microsoft.Network/expressRouteCircuits",
  "location": "westus",
  "properties": {
    "provisioningState": "Succeeded",
    "resourceGuid": "xxx",
    "peerings": [
      {
        "name": "AzurePrivatePeering",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/AzurePrivatePeering",
        "etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
        "properties": {
          "provisioningState": "Succeeded",
          "peeringType": "AzurePrivatePeering",
          "azureASN": 12076,
          "peerASN": 65000,
          "primaryPeerAddressPrefix": "10.142.3.8/30",
          "secondaryPeerAddressPrefix": "10.142.3.12/30",
          "primaryAzurePort": "",
          "secondaryAzurePort": "",
          "state": "Enabled",
          "vlanId": 1740,
          "gatewayManagerEtag": "",
          "lastModifiedBy": "Customer",
          "connections": [],
          "peeredConnections": []
        },
        "type": "Microsoft.Network/expressRouteCircuits/peerings"
      }
    ],
    "authorizations": [
      {
        "name": "TNT40-SNTC",
        "id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/authorizations/TNT40-SNTC",
        "etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
        "properties": {
          "provisioningState": "Succeeded",
          "authorizationKey": "xxx",
          "authorizationUseStatus": "Available"
        },
        "type": "Microsoft.Network/expressRouteCircuits/authorizations"
      }
    ],
    "serviceProviderProperties": {
      "serviceProviderName": "VMware Virtustream",
      "peeringLocation": "Silicon Valley VMWARE01",
      "bandwidthInMbps": 50
    },
    "circuitProvisioningState": "Enabled",
    "allowClassicOperations": false,
    "gatewayManagerEtag": "",
    "serviceKey": "xxx",
    "serviceProviderProvisioningState": "Provisioned",
    "allowGlobalReach": false,
    "globalReachEnabled": false,
    "stag": 11
  },
  "sku": {
    "name": "Standard_MeteredData",
    "tier": "Standard",
    "family": "MeteredData"
  }
}

Name                             : xxx-er
ResourceGroupName                : xxx
Location                         : westus
Id                               : /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er
Etag                             : W/"d536eac8-1069-4eef-b792-dee6d55f5b49"
ProvisioningState                : Succeeded
Sku                              : {
                                     "Name": "Standard_MeteredData",
                                     "Tier": "Standard",
                                     "Family": "MeteredData"
                                   }
CircuitProvisioningState         : Enabled
ServiceProviderProvisioningState : Provisioned
ServiceProviderNotes             : 
ServiceProviderProperties        : {
                                     "ServiceProviderName": "VMware Virtustream",
                                     "PeeringLocation": "Silicon Valley VMWARE01",
                                     "BandwidthInMbps": 50
                                   }
ExpressRoutePort                 : null
BandwidthInGbps                  : 
Stag                             : 11
ServiceKey                       : xxx
Peerings                         : [
                                     {
                                       "Name": "AzurePrivatePeering",
                                       "Etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
                                       "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/Azur
                                   ePrivatePeering",
                                       "PeeringType": "AzurePrivatePeering",
                                       "State": "Enabled",
                                       "AzureASN": 12076,
                                       "PeerASN": 65000,
                                       "PrimaryPeerAddressPrefix": "10.142.3.8/30",
                                       "SecondaryPeerAddressPrefix": "10.142.3.12/30",
                                       "PrimaryAzurePort": "",
                                       "SecondaryAzurePort": "",
                                       "VlanId": 1740,
                                       "ProvisioningState": "Succeeded",
                                       "GatewayManagerEtag": "",
                                       "LastModifiedBy": "Customer",
                                       "Connections": [],
                                       "PeeredConnections": []
                                     }
                                   ]
Authorizations                   : [
                                     {
                                       "Name": "TNT40-SNTC",
                                       "Etag": "W/\"d536eac8-1069-4eef-b792-dee6d55f5b49\"",
                                       "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/authorization
                                   s/TNT40-SNTC",
                                       "AuthorizationKey": "xxx",
                                       "AuthorizationUseStatus": "Available",
                                       "ProvisioningState": "Succeeded"
                                     }
                                   ]
AllowClassicOperations           : False
GatewayManagerEtag               : 

DEBUG: AzureQoSEvent: CommandName - Set-AzExpressRouteCircuit; IsSuccess - True; Duration - 00:00:03.1617229; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 2:55:12 PM - SetAzureExpressRouteCircuitCommand end processing.
DEBUG: 2:55:12 PM - SetAzureExpressRouteCircuitCommand end processing.

PS /usr/local/bin> $ckt1

Name                             : xxx-er
ResourceGroupName                : xxx
Location                         : westus
Id                               : /subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er
Etag                             : W/"196c0a21-376f-447b-824e-af34338db506"
ProvisioningState                : Succeeded
Sku                              : {
                                     "Name": "Standard_MeteredData",
                                     "Tier": "Standard",
                                     "Family": "MeteredData"
                                   }
CircuitProvisioningState         : Enabled
ServiceProviderProvisioningState : Provisioned
ServiceProviderNotes             : 
ServiceProviderProperties        : {
                                     "ServiceProviderName": "VMware Virtustream",
                                     "PeeringLocation": "Silicon Valley VMWARE01",
                                     "BandwidthInMbps": 50
                                   }
ExpressRoutePort                 : null
BandwidthInGbps                  : 
Stag                             : 11
ServiceKey                       : xxx
Peerings                         : [
                                     {
                                       "Name": "AzurePrivatePeering",
                                       "Etag": "W/\"196c0a21-376f-447b-824e-af34338db506\"",
                                       "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/AzurePrivatePeering",
                                       "PeeringType": "AzurePrivatePeering",
                                       "State": "Enabled",
                                       "AzureASN": 12076,
                                       "PeerASN": 65000,
                                       "PrimaryPeerAddressPrefix": "10.142.3.8/30",
                                       "SecondaryPeerAddressPrefix": "10.142.3.12/30",
                                       "PrimaryAzurePort": "",
                                       "SecondaryAzurePort": "",
                                       "VlanId": 1740,
                                       "ProvisioningState": "Succeeded",
                                       "GatewayManagerEtag": "",
                                       "LastModifiedBy": "Customer",
                                       "Connections": [
                                         {
                                           "Name": "xxx",
                                           "AddressPrefix": "10.142.3.24/29",
                                           "AuthorizationKey": "xxx",
                                           "ExpressRouteCircuitPeering": {
                                             "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/AzurePrivatePeering"
                                           },
                                           "PeerExpressRouteCircuitPeering": {
                                             "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/peerings/AzurePrivatePeering"
                                           }
                                         }
                                       ],
                                       "PeeredConnections": []
                                     }
                                   ]
Authorizations                   : [
                                     {
                                       "Name": "TNT40-SNTC",
                                       "Etag": "W/\"196c0a21-376f-447b-824e-af34338db506\"",
                                       "Id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Network/expressRouteCircuits/xxx-er/authorizations/TNT40-SNTC",
                                       "AuthorizationKey": "xxx",
                                       "AuthorizationUseStatus": "Available",
                                       "ProvisioningState": "Succeeded"
                                     }
                                   ]
AllowClassicOperations           : False
GatewayManagerEtag               : 
ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mialdrid @aznetsuppgithub

dingmeng-xue commented 4 years ago

Network team, according customer's log, PUT request is sent to server and response indicates globalReachEnabled = true. But response of GET request in the same cmdlet following PUT request shows globalReachEabled = false. Please help to look into it.

mialdrid commented 4 years ago

Ack: looking into this.

ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @exrsuppgithub.

SaurabhSharma-MSFT commented 3 years ago

@mialdrid Do you have any updates on this issue. @Zsoldier Apologies for the delayed response. I see that this issue is opened long time ago and no further activity had taken place. So wanted to check if you are still looking for assistance on this query? Please let us know .