Can't create image from tar.gz file in bucket - google-compute-engine

I'm trying to create a custom image using Console or gcloud, i.e. (Note: URLs are masked with [naURL] to get around URL posting limitation.):
$ gcloud compute images create debian-9-1-v20170810-1 --source-uri=https:[naURL]//storage.googleapis.com/[my bucket]/compressed-image.tar.gz
The command runs for about half an hour (i.e. 1800s) and then gives the following error:
ERROR: (gcloud.compute.images.create) Could not fetch resource:
- Did not create the following resources within 1800s: https:[naURL]//www.googleapis.com/compute/v1/projects/spherical-proxy-175708/global/images/debian-9-1-v20170810-1. These operations may still be underway remotely and may still succeed; use gcloud list and describe commands or https:[naURL]//console.developers.google.com/ to check resource state
The corresponding REST record accessible via Console>Compute Engine>Operations for the item reads:
{
"kind": "compute#operation",
"id": "5371669110648613089",
"name": "operation-1502320142020-5565a2a676da1-06d76920-4c86568d",
"operationType": "insert",
"targetLink": "https:[naURL]//www.googleapis.com/compute/v1/projects/spherical-proxy-175708/global/images/debian-9-1-v20170810-1",
"targetId": "3098231522309056737",
"status": "DONE",
"user": "andree.leidenfrost#gmail.com",
"progress": 100,
"insertTime": "2017-08-09T16:09:02.501-07:00",
"startTime": "2017-08-09T16:09:03.136-07:00",
"endTime": "2017-08-09T16:59:29.128-07:00",
"error": {
"errors": [
{
"code": "INTERNAL_ERROR",
"message": "Code: '8625676013601614622'"
}
]
},
"httpErrorStatusCode": 503,
"httpErrorMessage": "SERVICE UNAVAILABLE",
"selfLink": "https:[naURL]//www.googleapis.com/compute/v1/projects/spherical-proxy-175708/global/operations/operation-1502320142020-5565a2a676da1-06d76920-4c86568d"
}
Because the HTTP error is 503 "SERVICE UNAVAILABLE" I've tried a few times over the last couple of days but the problem persists.
I'm trying to follow the instructions in document Importing Boot Disk Images to Compute Engine.
Any help or hints how to debug further would be greatly appreciated!

Related

NotAuthorizedOrNotFound when pushing custom metric

When I try to push a custom metric to the Oracle Cloud Monitoring service using the Oracle Cloud CLI, I receive the following error:
ServiceError:
{
"code": "NotAuthorizedOrNotFound",
"message": "Authorization failed or requested resource not found.",
"opc-request-id": "request id",
"status": 404
}
This occurs when using the Administrator account and when using an instance principal which has monitoring permission.
Here is the JSON that I am pushing to the Monitoring service:
[
{
"namespace": "myFirstNamespace",
"compartmentId": "tenant id",
"resourceGroup": "myFirstResourceGroup",
"name": "successRate",
"dimensions": {
"resourceId": "ocid1.exampleresource.region1.phx.exampleuniqueID",
"appName": "myAppA"
},
"metadata": {
"unit": "percent",
"displayName": "MyAppA Success Rate"
},
"datapoints": [
{
"timestamp": "2021-06-01T22:19:20Z",
"value": 83.0
}
]
}
]
The CLI command that I am using is:
oci monitoring metric-data post --metric-data file://metric-data.json
The OCI CLI command should be:
oci monitoring metric-data post --metric-data file://metric-data.json --endpoint https://telemetry-ingestion.{{ region }}.oraclecloud.com
replacing {{ region }} with your region.
The --endpoint https://telemetry-ingestion.{{ region }}.oraclecloud.com parameter needs to be added.
Looks like some authorization issue. Please cross check if the instance principle has all the required permission assigned. Please review this document Publishing Custom Metrics and Overview of Monitoring

Google Cloud Platform can't add URI that ends with .web.app to Oauth Client ID

I have an existing client-id (Web) with some working UIDs, I added a time ago. I now wanted to add one more and when I press the save button it just does not work (ProgressIndicator is spinning infinitely). I have a working internet connection and tried with several browsers (Safari,Chrome).
Has anyone seen this?
Edit:
I just tried again with it. I got this error in the web console:
{
"error": {
"code": 400,
"message": "The request failed because one of the field of the resource is invalid.",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.rpc.PreconditionFailure",
"violations": [
{
"type": "client_auth_config",
"subject": "?error_code=9&error_field_name=pending_domains&error_field_value=test-page.web.app"
}
]
}
]
}
}
When I added a domain that ended in .firebaseapp.com, everything worked. Since the domain I want to use ends in .web.app, I have a problem with this though.

How to Move/Rename a file in TFS Source Control 2015, using the REST API?

I am trying to move files on our internal TFS using Python and the TFS REST API; the server appears to only support the API up-to version 2, but on MSDN I cannot find any docs for versions below v4.1.
The URL I'm posting to is https://<server>/tfs/<Collection>/<Project>/_apis/tfvc/changesets
Currently my best guess at the correct JSON body for the post request looks like this:
{
"comment": "moved file",
"changes": [{
"changeType": "rename",
"item": {
"path": "<filepath>",
"version": 468,
"sourceServerItem": "<filepath>"
}
}]
}
But i cannot get further than an HTTp error 400 bad request with the following message
{
"$id": "1",
"innerException": null,
"message": "Exactly one value for PathActions is required.\r\nParameter name: change.SourceServerItem",
"typeName": "System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
"typeKey": "ArgumentException",
"errorCode": 0,
"eventId": 0
}
And for the life of me i cannot find any reference to PathActions on google, that is not for git instead of tfvc, or a correct way of providing a value for this item.
Does anybody have a way of renaming/moving files on a TFVC via a HTTP request?
It just occurred to me to do a rename using the TFS web interface and peek at the request sent by the browser.
Turns out this is the correct format:
{
"comment": "Moved File",
"changes": [
{
"changeType": 8,
"sourceServerItem": "<old path>",
"item": {
"path": "<new path>",
"version": 470
}
}
]
}

Deploy Cloudera cluster on azure FAILED , JSON/ARM template issue

I m trying to install cloudera on azure using the link below https://github.com/Azure/azure-quickstart-templates/tree/master/cloudera-on-centos It gave me a few errors, below deploy cloudera on centos Required property 'resources' not found in JSON
I solved it. BUT I m now stuck at some point. "message": "Deployment template validation failed: 'The template 'copy' definition at line '0' and column '0' is missing a copy input value.
I use copy for resources, not for properties, there is no need for input value.
{
"type": "Microsoft.Network/publicIPAddresses",
"name": "[concat(variables('publicIPAddressName'), copyIndex())]",
"location": "[parameters('location')]",
"copy": [{
"name": "publicIPLoop",
"count": "[parameters('vmCount')]"
}],
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
"domainNameLabel": "[concat(parameters('dnsNamePrefix'), '-dn', copyIndex())]"
}
}
}
copy should look like this:
"copy": {
"name": "publicIPLoop",
"count": "[parameters('vmCount')]"
},
its an object, not an array
THANKS A LOT for your response,
Initially there was no bracket , it gave me another error:
"message": "Deployment template validation failed: 'The template resource 'master-node' at line '493' and column '9' is not valid: The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified. Please see https://aka.ms/arm-copy for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.'."
I googled it, and I saw the post
copyindex() error in arm template
I put the brackets, to make it an array, and now it asks me for input, which does not make sense, according to
https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-multiple

Json dependsOn ignored

Hi I have this code which deploys some vm's and a vpn solution, however it deploys the "vmRdsDeployment" before the vnet is deployed. I've tried several different variations of dependsOn but nothing seems to work
The error is:
New-AzureRmResourceGroupDeployment : 18:38:57 - Resource Microsoft.Network/loadBalancers 'ilb-m21-m21-m21-vpn-rds' failed with message '{
"error": {
"code": "InvalidResourceReference",
"message": "Resource /subscriptions/0309443f-e9d3-4974-9a9a-08a476b6ae2e/resourceGroups/RG-VPN-TEST/providers/Microsoft.Network/virtualNetworks/VNET-M21-M21-M21-VPN
referenced by resource /subscriptions/0309443f-e9d3-4974-9a9a-08a476b6ae2e/resourceGroups/rg-vpn-test/providers/Microsoft.Network/loadBalancers/ilb-m21-m21-m21-vpn-rds
was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.",
"details": [
{
"code": "NotFound",
"message": "Resource
/subscriptions/0309443f-e9d3-4974-9a9a-08a476b6ae2e/resourceGroups/RG-VPN-TEST/providers/Microsoft.Network/virtualNetworks/VNET-M21-M21-M21-VPN not found."
}
]
Template: https://pastebin.com/rKRP5htc
In this case the error seems to be due to vnet being conditioned to not deploy with "condition": false, after changing to true everything worked as expected.