Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 20 17:30

    simaishi on kasparov-1-alpha1

    (compare)

  • Nov 20 15:05
    miq-bot unlabeled #644
  • Nov 20 15:05
    miq-bot commented #644
  • Nov 20 15:02

    agrare on master

    Declared DDF schema for cloud v… Set the supports :cloud_volume/… Merge pull request #644 from sk… (compare)

  • Nov 20 15:02
    agrare closed #644
  • Nov 20 14:38
    miq-bot commented #644
  • Nov 20 14:38
    miq-bot commented #644
  • Nov 20 14:12
    skateman synchronize #644
  • Nov 19 10:00
    miq-bot commented #644
  • Nov 19 10:00
    miq-bot commented #644
  • Nov 19 09:55
    skateman synchronize #644
  • Nov 18 15:15
    miq-bot labeled #644
  • Nov 18 15:15
    miq-bot commented #644
  • Nov 18 15:11

    agrare on master

    Supports label mapping in infra… Merge pull request #665 from lp… (compare)

  • Nov 18 15:11
    agrare closed #665
  • Nov 18 15:11
    agrare assigned #665
  • Nov 17 10:20

    andyvesel on master

    Update Network Targeted refresh… Update refresh to catch not fou… Merge pull request #667 from au… (compare)

  • Nov 17 10:20
    andyvesel closed #667
  • Nov 17 10:20
    andyvesel commented #667
  • Nov 17 07:05
    aufi labeled #667
Keenan Brock
@kbrock
also record.parent.child.object_id != record.object_id -- which causes extra lookups and is tricky
so in theory you could change the parent record but the child record in memory would be wrong
even if they are linked in memory -- not talking some other query in some other place. talking in the same block of code/thread
Daniel Berger
@djberg96
@Fryguy, @agrare my stab at it: ManageIQ/manageiq-providers-openstack#647
Keenan Brock
@kbrock

@agrare does this make any sense to you? https://github.com/ManageIQ/manageiq/blob/master/app/models/mixins/swift_manager_mixin.rb#L23-L35

before we create a provider, save the child provider (which is not valid until after the parent is saved) and update all ems id (for a provider that hasn't been created yet because we are in the before_create) and change it to the child

This is true with cinder and swift. The save as far as I can tell always fails.
I was going to suggest removing them (added by rich in 2016) since I don't see how this could ever work. Maybe it was in place of a db migration?

Keenan Brock
@kbrock
the network provider does seem to work, but it only sets a few parameters, which seems right to me
Adam Grare
@agrare
yeah that looks weird, usually the associations are :autosave => true so we just set the attributes but dont save explicitly
Added run-time migration between managers.
Keenan Brock
@kbrock
cinder has the same exact code
it either throw an exception for us, or it returns false to save - not doing anything
@agrare I'll create a PR to discuss further
@agrare @Fryguy in some cases, the providers redeclare an association using the provider specific class, and other cases they call build with the class name passed as :type. Do we have a preferred method? I kind of like the overloading but not sure if you two have an opinion
Adam Grare
@agrare
Yeah that kind of thing is why I thought if we could have one right way of doing this and stick it in a mixin we could avoid the weird cases
that is very nice because we just say build
but the has manager mixin encourages the generic case
just noticed that everyone re-implements these methods and does the same thing and now that I want to tweak that method it is difficult
Keenan Brock
@kbrock

a specific case of the ensure_network_manager wouldn't even be needed if we declared the association correctly

  include ManageIQ::Providers::Openstack::ManagerMixin
  # that declared:
  #has_one :network_manager,
  #        :foreign_key => :parent_ems_id,
  #        :class_name  => "ManageIQ::Providers::NetworkManager"

  def ensure_network_manager
    build_network_manager(:type => 'ManageIQ::Providers::Openstack::NetworkManager') unless network_manager
  end

vs

  include ManageIQ::Providers::Openstack::ManagerMixin
  # that declared ensure_network_manager
  # def ensure_network_manager
  #  build_network_manager unless network_manager
  # end
  has_one :network_manager,
          :foreign_key => :parent_ems_id,
          :class_name  => "ManageIQ::Providers::OpenStack::NetworkManager"
think I like declaring the class in openstack where the association is defined - that feels a little more rails like to me
and dropping the custom build (ensure) stuff
Keenan Brock
@kbrock
ok, ManageIQ/manageiq#20701 tries to explain
Daniel Berger
@djberg96
stuck on this one if anyone has any suggestions: https://bugzilla.redhat.com/show_bug.cgi?id=1856644
Adam Grare
@agrare
maybe some logging around where we update the date? make sure it a. gets to that point and isn't failing silently and b. double-check that it updates it properly
Daniel Berger
@djberg96
random side note, i guess openstack providers don't get a name, except the cloud manager
Daniel Berger
@djberg96
is Swift deliberately not scoped under openstack?
Keenan Brock
@kbrock
yea, revisiting that
looks like it is defined in 2 spots and it is only used by openstack
but when ever you define a generic abstraction that is only used by one caller, it is tricky to get that right
Jason Frey
@Fryguy
yes swift isn't openstack specific technically
Keenan Brock
@kbrock
@djberg96 so I'm splitting up the concepts ManageIQ/manageiq#20739 and ManageIQ/manageiq-providers-openstack#654
they overlap and use after save callbacks when they should probably be in before validation callbacks
Daniel Berger
@djberg96
ok
Keenan Brock
@kbrock
but yes - your questions and/or confusion show that you understand this perfectly well
Daniel Berger
@djberg96
looking at https://bugzilla.redhat.com/show_bug.cgi?id=1856644 again, not getting very far
downloaded some stuff they posted, seems to be missing some log entries i expect, but I did notice this
might be related, might not
Daniel Berger
@djberg96
after changing it to update! he sees ActiveRecord::RecordInvalid (Validation failed: ManageIQ::Providers::Openstack::CloudManager: Guid can't be blank)
so somehow the ems doesn't have a guid? how does that happen?
Adam Grare
@agrare
yeah I just saw that, well that explains a lot
Adam Grare
@agrare
guid gets auto-generated I just don't see where
well its an easy fix, they can just .update!(:guid => SecureRandom.uuid) for now
but I have no idea how a record got created without a guid
Jason Frey
@Fryguy
they had to have manually inserted
or somehow in the code, someone passed :guid => nil
Keenan Brock
@kbrock
odd
Adam Grare
@agrare
even passing :guid => nil is failing the validation
they would have had to do this at the postgres level I think