Skip to content

Commit

Permalink
azure: fix for #3065
Browse files Browse the repository at this point in the history
  • Loading branch information
cicharka committed Apr 7, 2022
1 parent a0811a1 commit dfc505c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- [#2653](https://github.com/epiphany-platform/epiphany/issues/2653) - Epicli is failing in air-gapped infra mode
- [#3004](https://github.com/epiphany-platform/epiphany/issues/3004) - `disk_size_gb` hardcoded in `/usr/local/epicli/data/azure/defaults/infrastructure/virtual-machine.yml`
- [#2934](https://github.com/epiphany-platform/epiphany/issues/2934) - Duplicated entries in image-registry defaults (LTS)
- [#3065](https://github.com/epiphany-platform/epiphany/issues/3065) - Flag `delete_os_disk_on_termination` has no effect when removing cluster

## [1.0.2] 2022-01-26

Expand Down
4 changes: 3 additions & 1 deletion core/src/epicli/cli/epicli.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def delete_parser(subparsers):
sub_parser._action_groups.append(optional)

def run_delete(args):
if not query_yes_no('Do you really want to delete your cluster?'):
if not query_yes_no('You are trying to delete your cluster. '
'If your configuration does not allow to keep the existing disks used in the cluster, you will lose your data. '
'Make sure your data is safe. Do you really want to delete your cluster?'):
return 0
adjust_paths_from_build(args)
with DeleteEngine(args) as engine:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ specification:
sku: 18.04-LTS
version: "18.04.202103151" # Never put latest on anything! Need to always pin the version number but testing we can get away with it
storage_os_disk:
delete_on_termination: false
managed: false
caching: ReadWrite
create_option: FromImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ resource "azurerm_virtual_machine" "{{ specification.name }}" {
# windows specific stuff here maybe... hopefully never.
{%- endif %}

{%- if specification.storage_os_disk.managed != true %}
delete_os_disk_on_termination = "{{ specification.storage_os_disk.delete_on_termination | lower }}"
{%- endif %}

storage_os_disk {
name = "{{ specification.name }}-os-disk"
caching = "{{ specification.storage_os_disk.caching }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ properties:
storage_os_disk:
type: object
properties:
delete_on_termination:
type: boolean
managed:
type: boolean
caching:
Expand Down
5 changes: 5 additions & 0 deletions docs/home/howto/CLUSTER.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,11 @@ Epicli has a delete command to remove a cluster from a cloud provider (AWS, Azur

From the defined cluster build folder it will take the information needed to remove the resources from the cloud provider.

### Note for Azure cloud provider

Make sure you can safely remove OS and data disks - Epiphany does not support cluster removal from Azure
while preserving existing disks.

## Single machine cluster

*Please read first prerequisites related to [hostname requirements](./PREREQUISITES.md#hostname-requirements).*
Expand Down

0 comments on commit dfc505c

Please sign in to comment.