fog / fog-xenserver

Module for the 'fog' gem to support XENSERVER
MIT License
16 stars 22 forks source link

fog-xenserver missing things from original fog/xenserver? #59

Closed mmoll closed 8 years ago

mmoll commented 8 years ago

In http://projects.theforeman.org/issues/14696#change-67041 a user reported regressions from switching to a higher fog version, which requires the usage of the modularized fog-xenserver. After a quick glance, it seems that some things are missing from the original xenserver module coming from the original fog, e.g. the redirect_to_master parameter. How should this be dealt with?

The original problem is that after updating to a newer fog version, the xenserver plugin for Foreman stops to work, without throwing any obvious errors, and now I think it's because "something" is missing/different compared to the original xenserver stuff that was included in fog.

fernandes commented 8 years ago

hi @mmoll

a few months (I think two years) ago, we refactored to a better organization and to support the whole XenServer API, could you please provide a detailed code snippet for this use case? (I read the issue but I'm kinda lost on getting the whole picture)

plribeiro3000 commented 8 years ago

@mmoll Yeah. Some stuff changed on purpose but i don't think thats the case to what you are saying. Can you elaborate?

The Server creation changed by a lot. Before it was creating a lot of resources with just one call and that was really bad to maintain so we dropped that. Now you need to create each of the required resources by XenServer individually.

If thats not what you are having, can you please describe which XenServer call are you trying to make?

mmoll commented 8 years ago

The code in question is i.e. https://github.com/theforeman/foreman-xen/blob/master/app/models/foreman_xen/xenserver.rb#L194

Is there any documentation, what changed?

plribeiro3000 commented 8 years ago

Yeah. Thats the exact code that changed. Prior you could pass the network and the disk and it would create everything for you. Now you need to manually create them after creating the VM and then provision.

@fernandes Do you have a snippet for VM creation you can share here?

fernandes commented 8 years ago

I extracted our system provisioning into a single procedure, maybe I missed some detail, but it's a good starting point, if anything else is missing, please tell me so I can update the gist to become a good reference

here is the gist

mmoll commented 8 years ago

seems to be fixed with theforeman/foreman-xen@9e5f80d

plribeiro3000 commented 8 years ago

:+1:

Em ter, 30 de ago de 2016 20:03, Michael Moll notifications@github.com escreveu:

Closed #59 https://github.com/fog/fog-xenserver/issues/59.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fog/fog-xenserver/issues/59#event-772909946, or mute the thread https://github.com/notifications/unsubscribe-auth/AApEuP-myiF3WibtJgNWi9tZioLygJLBks5qlLbCgaJpZM4I4-7V .

fernandes commented 8 years ago

hi @mmoll,

congrats on the hard work 🙇! happy everything is ok now.

If there's something we can help, please get in touch.

mmoll commented 8 years ago

all props to @alejandrocfg :dancers:

fernandes commented 8 years ago

@alejandrocfg 👏 🎉 😎