Skip to content

Instantly share code, notes, and snippets.

View bernadinm's full-sized avatar

Miguel Bernadin bernadinm

  • San Francisco, California
  • 21:40 (UTC -07:00)
View GitHub Profile
@bernadinm
bernadinm / invalid_function.log
Last active September 27, 2017 21:55
Should force for new creation
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
~ azurerm_virtual_machine.agent[0]
vm_size: "Standard_DS1_v2" => "Standard_DS11_v2"
@bernadinm
bernadinm / debug.log
Created September 7, 2017 22:51
terraform taint azurerm_virtual_machine.node.0; terraform apply; fails
Error applying plan:
1 error(s) occurred:
* azurerm_virtual_machine.node[0]: 1 error(s) occurred:
* azurerm_virtual_machine.node.0: compute.VirtualMachinesClient#CreateOrUpdate: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="NotFound" Message="The entity was not found."
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
@bernadinm
bernadinm / azure-ip-cannot-be-deleted.log
Created August 31, 2017 21:08
StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="PublicIPAddressCannotBeDeleted" Message="Public IP address load-balancer-ip can not be deleted since it is still allocated to resource load balancer." Details=[]
This file has been truncated, but you can view the full file.
2017/08/31 13:36:12 [INFO] Terraform version: 0.10.2
2017/08/31 13:36:12 [INFO] Go runtime version: go1.8.3
2017/08/31 13:36:12 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.10.2/bin/terraform", "destroy", "--force"}
2017/08/31 13:36:12 [DEBUG] Attempting to open CLI config file: /Users/mbernadin/.terraformrc
2017/08/31 13:36:12 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/08/31 13:36:12 [INFO] CLI command args: []string{"destroy", "--force"}
2017/08/31 13:36:12 [INFO] command: empty terraform config, returning nil
2017/08/31 13:36:12 [DEBUG] command: no data state file found for backend config
2017/08/31 13:36:12 [DEBUG] New state was assigned lineage "d78ea0e1-951c-4f5e-837a-5e9da3bce6bd"
2017/08/31 13:36:12 [INFO] command: backend initialized: <nil>
@bernadinm
bernadinm / azure-ip-cannot-be-deleted.log
Created August 31, 2017 21:08
StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="PublicIPAddressCannotBeDeleted" Message="Public IP address load-balancer-ip can not be deleted since it is still allocated to resource load balancer." Details=[]
This file has been truncated, but you can view the full file.
2017/08/31 13:36:12 [INFO] Terraform version: 0.10.2
2017/08/31 13:36:12 [INFO] Go runtime version: go1.8.3
2017/08/31 13:36:12 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.10.2/bin/terraform", "destroy", "--force"}
2017/08/31 13:36:12 [DEBUG] Attempting to open CLI config file: /Users/mbernadin/.terraformrc
2017/08/31 13:36:12 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/08/31 13:36:12 [INFO] CLI command args: []string{"destroy", "--force"}
2017/08/31 13:36:12 [INFO] command: empty terraform config, returning nil
2017/08/31 13:36:12 [DEBUG] command: no data state file found for backend config
2017/08/31 13:36:12 [DEBUG] New state was assigned lineage "d78ea0e1-951c-4f5e-837a-5e9da3bce6bd"
2017/08/31 13:36:12 [INFO] command: backend initialized: <nil>
Error applying plan:
1 error(s) occurred:
* azurerm_public_ip.node_load_balancer_public_ip: 1 error(s) occurred:
* azurerm_public_ip.node_load_balancer_public_ip: network.PublicIPAddressesClient#CreateOrUpdate: Failure responding to request: StatusCode=429 -- Original Error: autorest/azure: Service returned an error. Status=429 Code="RetryableError" Message="A retryable error occurred." Details=[{"code":"RetryableErrorDueToAnotherOperation","message":"Operation PutPublicIpAddressOperation (ed2bba16-9c2f-41fb-a881-79052f54cf87) is updating resource /subscriptions/b1ed8f2f-ceda-41d5-a0a8-95960b5340c2/resourceGroups/deleteme-038e/providers/Microsoft.Network/publicIPAddresses/lb-ip. The call can be retried in 14 seconds."}]
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
@bernadinm
bernadinm / destroy_then_immediately_create.log
Created August 31, 2017 17:50
Terraform believe that the resource group is destroyed and when asked to create it again, the Azure api errors.
mesospheres-MacBook-Pro-8:repro mbernadin$ terraform destroy --force
azurerm_resource_group.mb: Refreshing state... (ID: /subscriptions/134r282f-ceda-41d5-a0a8-1251255340c2/resourceGroups/deleteme)
azurerm_public_ip.lb: Refreshing state... (ID: /subscriptions/134r282f-ceda-41d5-a0a8-...rosoft.Network/publicIPAddresses/lb-ip)
azurerm_resource_group.mb: Destroying... (ID: /subscriptions/134r282f-ceda-41d5-a0a8-1251255340c2/resourceGroups/deleteme)
azurerm_resource_group.mb: Still destroying... (ID: /subscriptions/134r282f-ceda-41d5-a0a8-1251255340c2/resourceGroups/deleteme, 10s elapsed)
azurerm_resource_group.mb: Still destroying... (ID: /subscriptions/134r282f-ceda-41d5-a0a8-1251255340c2/resourceGroups/deleteme, 20s elapsed)
azurerm_resource_group.mb: Still destroying... (ID: /subscriptions/134r282f-ceda-41d5-a0a8-1251255340c2/resourceGroups/deleteme, 30s elapsed)
azurerm_resource_group.mb: Still destroying... (ID: /subscriptions/134r282f-ceda-41d5-a0a8-1251255340c2/resourceGroups/deleteme, 40s elapsed)
azurer
@bernadinm
bernadinm / worked_on_second_try.log
Created August 31, 2017 00:27
Azure Didn't Make the Priority Change On First Try
mesospheres-MacBook-Pro-8:azure mbernadin$ terraform plan --var os=centos_7.3
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
data.external.whoami: Refreshing state...
data.template_file.os-setup: Refreshing state...
data.template_file.azure_version: Refreshing state...
data.template_file.azure_offer: Refreshing state...
data.template_file.traditional_os_user: Refreshing state...
@bernadinm
bernadinm / panic.log
Last active August 30, 2017 22:01
[PANIC] Azure LoadBalancer Cannot Be Destroyed Dependency
Error applying plan:
4 error(s) occurred:
* azurerm_lb_rule.public_load_balancer_https_rule (destroy): 1 error(s) occurred:
* azurerm_lb_rule.public_load_balancer_https_rule: Error Creating/Updating LoadBalancer network.LoadBalancersClient#CreateOrUpdate: Failure responding to request: StatusCode=429 -- Original Error: autorest/azure: Service returned an error. Status=429 Code="RetryableError" Message="A retryable error occurred." Details=[{"code":"ReferencedResourceNotProvisioned","message":"Cannot proceed with operation because resource /subscriptions/<subscriptions_id>/resourceGroups/dcos-mbernadin-tfb701/providers/Microsoft.Compute/availabilitySets/mbernadin-tfb701-master-avset used by resource mbernadin-tfb701-pub-mas-elb is not in Succeeded state. Resource is in Updating state and the last operation that updated/is updating the resource is InternalOperation."}]
* azurerm_lb_rule.private_load_balancer_https_rule (destroy): 1 error(s) occurred:
* azurerm_lb_rule.private_load_balancer_https_rule: Error
@bernadinm
bernadinm / debug.log
Last active August 30, 2017 22:01
[DEBUG] Azure LoadBalancer Cannot Be Destroyed Dependency
2017/08/30 14:38:15 [INFO] Terraform version: 0.10.2
2017/08/30 14:38:15 [INFO] Go runtime version: go1.8.3
2017/08/30 14:38:15 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.10.2/bin/terraform", "destroy", "--force"}
2017/08/30 14:38:15 [DEBUG] Attempting to open CLI config file: /Users/mbernadin/.terraformrc
2017/08/30 14:38:15 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/08/30 14:38:15 [INFO] CLI command args: []string{"destroy", "--force"}
2017/08/30 14:38:15 [INFO] command: empty terraform config, returning nil
2017/08/30 14:38:15 [DEBUG] command: no data state file found for backend config
2017/08/30 14:38:15 [DEBUG] New state was assigned lineage "02bc3440-e5f2-447b-951a-fb63124fd310"
2017/08/30 14:38:15 [INFO] command: backend initialized: <nil>
@bernadinm
bernadinm / Master Replacement with Static List.md
Last active March 28, 2021 00:17
Procedure to Replace Single Master with Master Discovery Set to Static

Master Replacement with Static List Procedure

Objective: WIth this procedure, we want to replace node 172.31.1.23 with node 172.31.7.30. Also, it is required that we change exhibitor_zk_path to something unique in order for this procedure to work.

Begin

Configure the bootstrap node with the modified config.yaml that has a change to a new exhibitor_zk_path along with the master node that you want to replace for master_list

Important NOTE: The most important piece is exhibitor_storage_backend: zookeeper and exhibitor_zk_path: "/masterip-change-20170127". You must set exhibitor_zk_path to be something unique otherwise your cluster wont converge.