Code Monkey home page Code Monkey logo

Comments (13)

decentral1se avatar decentral1se commented on May 30, 2024 1

Yeah I guess for the testing use case, you want to tear down all resources afterwards.

Let's see what comes out of that ticket upstream.

from molecule-hetznercloud.

xoxys avatar xoxys commented on May 30, 2024

Pretty sure it is expected to not auto delete the volume as it can be reused and attached to a different server. Maybe some kind of fore option is possible.

from molecule-hetznercloud.

xoxys avatar xoxys commented on May 30, 2024

Wait my fault... You were talking about the hcloud_volume module... In this case, I agree
:D

from molecule-hetznercloud.

decentral1se avatar decentral1se commented on May 30, 2024

OK, looks like it is on our end, need to investigate:

ansible-collections/hetzner.hcloud#47 (comment)

from molecule-hetznercloud.

xoxys avatar xoxys commented on May 30, 2024

I'm a bit confused as I'm using this construct since a while with the delegated driver in molecule without issues. As the servers were deleted first volumes should be unattached already if the hetzner_volume absent task is running.

from molecule-hetznercloud.

decentral1se avatar decentral1se commented on May 30, 2024

Hmmmm yeah weird...best reply as response to ansible-collections/hetzner.hcloud#47 (comment)?

Don't have time to dig into this right now...

from molecule-hetznercloud.

LKaemmerling avatar LKaemmerling commented on May 30, 2024

As i wrote in the initial issue, i think the problem is that the state is not correct to set to absent. I say present, otherwise, it would go through the "detaching" step.

from molecule-hetznercloud.

cwaninger avatar cwaninger commented on May 30, 2024

Hi guys,
I am having a similar issue right now. When I run molecule destroy, i get msg: volume with ID 'XXXXXX' is still attached to a server. I really want to delete the Volume in my case. But it does not even get detached correctly - it seems because the instances got deleted already. In the end, all instances are gone, but Volume is (even if detached), still existant.

So if we want to destroy molecule instances, should the workflow not be the other way around?

  1. delete volumes
  2. delete instances

This way, the volumes would really be deleted, if no delete_protection is enabled. Then there would also be no message about Volume being attached to the server. By the way - I have not yet checked the full code of the Plugin! So if I am completely wrong, I am sorry. But basically i can not destroy my instances due to the fact its still attached.

Regards

from molecule-hetznercloud.

decentral1se avatar decentral1se commented on May 30, 2024

Hmmm, it seems like we need to first then detach the volumes, delete the instances and then run the delete of the volumes again to finally fully delete them (EDIT: tested, this doesn't work). It seems the current logic of first deleting the instance with the still attached volumes (it is actually working for me but I see not for @cwaninger) is getting the volumes into a weird state!? Good point regard delete_protection, we should ensure that is disabled for testing runs. I will try to fix this shortly.

from molecule-hetznercloud.

decentral1se avatar decentral1se commented on May 30, 2024

I don't quite understand your comments in #24 (comment) @LKaemmerling, are you referring to https://github.com/ansible-community/molecule-hetznercloud/blob/main/molecule_hetznercloud/playbooks/destroy.yml? Because I don't see how setting that to present would help? Also re: ansible-collections/hetzner.hcloud#47 (comment) the server is not empty and the volume is technically not still attached since the instance is first deleted? I will take another look. It still feels like there is a bug in here somewhere.

from molecule-hetznercloud.

decentral1se avatar decentral1se commented on May 30, 2024

Quite confused now 😱 ansible-collections/hetzner.hcloud#84 (comment)

from molecule-hetznercloud.

decentral1se avatar decentral1se commented on May 30, 2024

Annnnd back to me/"us" 😂 ansible-collections/hetzner.hcloud#84 (comment)

from molecule-hetznercloud.

decentral1se avatar decentral1se commented on May 30, 2024

Ok, the saga continues but ansible-collections/hetzner.hcloud#47 (comment) happened! So it looks like this is something that will help when we can move to the new version. I am still stuck for time but I if anyone has spoons, this could be fixable now.

from molecule-hetznercloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.