Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] disk_size_gb hardcoded in /usr/local/epicli/data/azure/defaults/infrastructure/virtual-machine.yml #3004

Closed
7 of 18 tasks
wkalbar opened this issue Mar 3, 2022 · 4 comments
Assignees
Labels
type/backport Backporting to previous versions type/bug

Comments

@wkalbar
Copy link

wkalbar commented Mar 3, 2022

NOTE: See comment from @przemyslavic below, should be a simple backport to add this 1.0.3

Describe the bug
Variable disk_size_gb for VMs OS disks used in config.yml is overwritten by variable in /usr/local/epicli/data/azure/defaults/infrastructure/virtual-machine.yml

How to reproduce
Steps to reproduce the behavior:

  1. execute epicli init ... (with params)
  2. edit config file - change variable disk_size_gb to any value other than default 32GB
  3. execute epicli apply ...

Expected behavior
VMs should have OS disk size equal to value of disk_size_gb variable. Instead of this they have still 32Gb OS disks.

Config files
n/a

Environment

  • Cloud provider: Azure
  • OS: Ubuntu 18.046 LTS

epicli version: 1.0.2

Additional context
There is workaround to change this variable in /usr/local/epicli/data/azure/defaults/infrastructure/virtual-machine.yml inside container. But it's still workaround.


DoD checklist

  • Changelog
    • updated
    • not needed
  • COMPONENTS.md
    • updated
    • not needed
  • Schema
    • updated
    • not needed
  • Backport tasks
    • created
    • not needed
  • Documentation
    • added
    • updated
    • not needed
  • Feature has automated tests
  • Automated tests passed (QA pipelines)
    • apply
    • upgrade
    • backup/restore
  • Idempotency tested
  • All conversations in PR resolved
@seriva
Copy link
Collaborator

seriva commented Mar 3, 2022

Hey @wkalbar,

Did you define it properly inside your input config:

...
---
kind: infrastructure/virtual-machine
title: "Virtual Machine Infra"
provider: azure
name: default
version: 1.0.2
specification:
  storage_os_disk:
    disk_size_gb: 64 #for example
---
...

Pls add your config yaml so we can have a look what might be going on.

@wkalbar
Copy link
Author

wkalbar commented Mar 3, 2022

grep -B 5 disk_size_gb kilo-22061.yml

  storage_os_disk:
    delete_on_termination: false
    managed: false
    caching: ReadWrite
    create_option: FromImage
    disk_size_gb: 64
--
title: Virtual Machine Infra
provider: azure
name: repository-machine
specification:
  storage_os_disk:
    disk_size_gb: 64

@przemyslavic
Copy link
Collaborator

przemyslavic commented Mar 3, 2022

What works for me is:

...    
  components:
    repository:
      count: 1
    kubernetes_master:
      count: 1
    kubernetes_node:
      count: 1
    logging:
      count: 0
    monitoring:
      count: 0
    kafka:
      count: 0
    postgresql:
      count: 0
    load_balancer:
      count: 0
    rabbitmq:
      count: 0
version: 1.0.2
---
kind: infrastructure/virtual-machine
name: kubernetes-master-machine
provider: azure
based_on: kubernetes-master-machine
specification:
  storage_os_disk:
    disk_size_gb: 128
---
kind: infrastructure/virtual-machine
name: kubernetes-node-machine
provider: azure
based_on: kubernetes-node-machine
specification:
  storage_os_disk:
    disk_size_gb: 256

If you have a full configuration (generated from init --full) you have to attach:

  storage_os_disk:
    disk_size_gb: xxx

to the spec for each machine you want to change the disk size for.

Nevertheless, I confirm that changing the disk in only one place for the default machine is not working properly. It works fine starting form v1.1.0.

Comparing v1.0 to v1.1:
https://github.com/epiphany-platform/epiphany/blob/v1.0/core/src/epicli/cli/engine/schema/DefaultMerger.py
https://github.com/epiphany-platform/epiphany/blob/v1.1/core/src/epicli/cli/engine/schema/DefaultMerger.py
This has been added:

        default_config = select_first(self.docs, lambda x: x.name == 'default' and x.kind == doc.kind)

        if default_config is not None:
            merge_objdict(default_doc, default_config)

I think this could be the reason.

@seriva seriva added the type/backport Backporting to previous versions label Mar 3, 2022
@seriva
Copy link
Collaborator

seriva commented Mar 3, 2022

@przemyslavic Yes you are right, we didn't backport this apparently. Will mark it as backport for 1.0.3 and will fix it.

@seriva seriva changed the title [BUG] disk_size_gb hardcoded in /usr/local/epicli/data/azure/defaults/infrastructure/virtual-machine.yml [BACKPORT][v1.0.3] disk_size_gb hardcoded in /usr/local/epicli/data/azure/defaults/infrastructure/virtual-machine.yml Mar 3, 2022
@seriva seriva self-assigned this Mar 11, 2022
@seriva seriva changed the title [BACKPORT][v1.0.3] disk_size_gb hardcoded in /usr/local/epicli/data/azure/defaults/infrastructure/virtual-machine.yml [BUG] disk_size_gb hardcoded in /usr/local/epicli/data/azure/defaults/infrastructure/virtual-machine.yml Mar 11, 2022
seriva added a commit that referenced this issue May 11, 2022
* Added #2976

* Fixed #2992

* Fixed #2876

* Fixed #3004

* Fix #2934

* Added #1076

* Removed un-used certificate stuff

* Properly fixed #2876

* Add EOF EL

* Update CHANGELOG-1.0.md

Co-authored-by: Rafal Zeidler <[email protected]>

* azure: fix for #3065

* comment more entries for #2934

* Escalate permissions for ip command (#2952)

* Add documentation for custom terraform scripts

* Remove one more duplicate entry in image-registry defaults

Co-authored-by: Rafal Zeidler <[email protected]>
Co-authored-by: cicharka <[email protected]>
Co-authored-by: Irek Głownia <[email protected]>
Co-authored-by: przemyslavic <>
@seriva seriva closed this as completed May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/backport Backporting to previous versions type/bug
Projects
None yet
Development

No branches or pull requests

3 participants