ArchipelProject / Archipel

XMPP Based Orchestrator
http://archipelproject.org
GNU Affero General Public License v3.0
800 stars 126 forks source link

Permission problem with rostervm #1118

Closed ruthger closed 9 years ago

ruthger commented 9 years ago

I have a problem adding new hypervisors and virtualmachines to my roster. The problem started with upgrading ejabberd from 2.1.13 to 14.12. If I rollback the upgrade it will work again. I have used the new yml config from the wiki. I can add existing hypervisors and virtualmachines to my roster.

Steps I have tried to correct the problem:

INFO ::2015-03-05 11:42:12::utils.py:72::TNArchipelHypervisor.check_perm (xxx@yyy.zzz)::Checking permission for action rostervm asked by xxx@yyy.zzz INFO ::2015-03-05 11:42:12::utils.py:72::TNArchipelHypervisor.check_acp (xxx@yyy.zzz)::acp received: from: xxx@yyy.zzz, type: get, namespace: archipel:hypervisor:control, action: rostervm

Can you please give me a hint or if you want more info I will try to provide it.

CyrilPeponnet commented 9 years ago

What's the issue ?

On Mar 5, 2015, at 2:52 AM, ruthger notifications@github.com wrote:

I have a problem adding new hypervisors and virtualmachines to my roster. The problem started with upgrading ejabberd from 2.1.13 to 14.12. If I rollback the upgrade it will work again. I have used the new yml config from the wiki.

Steps I have tried to correct the problem:

Setup a new ejabberd server on a test server following all steps in the wiki. The same error occurs. Reinstall Archipel-Agent from nightly Reinstall Archipel-Agent from git Reinstall Archipel-Client from nightly INFO ::2015-03-05 11:42:12::utils.py:72::TNArchipelHypervisor.check_perm (xxx@yyy.zzz)::Checking permission for action rostervm asked by xxx@yyy.zzz INFO ::2015-03-05 11:42:12::utils.py:72::TNArchipelHypervisor.check_acp (xxx@yyy.zzz)::acp received: from: xxx@yyy.zzz, type: get, namespace: archipel:hypervisor:control, action: rostervm

Can you please give me a hint of If you want more info I will try to provide it.

— Reply to this email directly or view it on GitHub.

ruthger commented 9 years ago

If I create a new hypervisor or virtualmachine and add it to my roster the contact is added but has no icon or dashboard. Only the chat is shown. The client request permission for the rostervm many times until the browse freshes. In the log the two INFO lines are written multiple times. The problem only occurs in ejabberd 13.04 and higher.

CyrilPeponnet commented 9 years ago

The new yaml configuration has not been fully tested with latest releases of ejabberd. The behavior you have is basically because something get wrong with vcards. You can try something:

Instead of

mod_MODULE: []

Use


mod_MODULE: {}

So the module section will become:

    mod_adhoc: {}
    mod_announce:
        access: announce
    mod_caps: {}
    mod_configure: {}
    mod_disco: {}
    mod_http_bind:
        max_inactivity: 400 # timeout valie for BOSH usefull for a large number of VM
    mod_irc: {}
    mod_last: {}
    mod_muc:
        access: muc
        access_create: muc_create
        access_persistent: muc_create
        access_admin: muc_admin
    mod_offline: {}
    mod_privacy: {}
    mod_private: {}
    mod_pubsub:
        access_createnode: pubsub_createnode
        ignore_pep_from_offline: true
        last_item_cache: false
        max_items_node: 1000
        plugins:
            - "flat"
            - "hometree"
            - "pep"
    mod_register:
        access: register
    mod_roster: {}
    mod_shared_roster: {}
    mod_time: {}
    mod_vcard: {}
    mod_version: {}
    mod_admin_extra: {}

If it works I will update the wiki page.

ruthger commented 9 years ago

Sorry, no changes. Still only the chatbox is shown. The vcard info on the hypervisor tab virtualmachines taken from the default in the config file, not from what I entered.

CyrilPeponnet commented 9 years ago

Can you reset the vcard info you set in the config file and give a try ?

ruthger commented 9 years ago

Cyril,

The resetting of the vcard info in the configfile did not help. But I think the problem resides in the ArchipelVirtualMachine.manage_vcard and ArchipelVirtualMachine.did_receive_vcard function. When I create a new vm I get the following results in the archipel.log file. In the log I find that the vCard already exists, but the JID is new. I don't if this is normal behavior...

INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.connect_xmpp (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::Successfully connected to XMPP with JID 657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: going to run methods for hook HOOK_ARCHIPELENTITY_XMPP_CONNECTED INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.auth_xmpp (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::Trying to authentify the client with username 657842ca-cbc2-11e4-b36e-441ea13b7101 and resource hypervisor INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.auth_xmpp (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::Successfully authenticated. INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin centraldb INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin snapshoting INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin oomkiller INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin virtualmachine_appliance INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin vnc INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin hypervisor_network INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin storage INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin vmparking INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin xmppserver INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::handlers registred INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: going to run methods for hook HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED DEBUG ::2015-03-16 10:54:18::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method recover_pubsubs registered in hook with name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED and user_info: None (oneshot: False) DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.recover_pubsubs (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::Here is the final admin list: {u'4f2ed900-bb39-11e4-933e-28924a361270': u'ruthger@xxx.yyy.zzz', u'54d34486-bb39-11e4-9210-28924a361270': u'steffan@xxx.yyy.zzz', 'STATIC_admin@xxx.yyy.zzz': 'admin@xxx.yyy.zzz'} DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method connect_domain registered in hook with name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED and user_info: None (oneshot: False) WARNING ::2015-03-16 10:54:19::utils.py:74::TNArchipelVirtualMachine.connect_domain (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::LIBVIRT: Can't connect to domain with UUID 657842ca-cbc2-11e4-b36e-441ea13b7101 INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.change_presence (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::status change: Not defined show:xa INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: going to run methods for hook HOOK_VM_INITIALIZE DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method hook_vm_event registered in hook with name HOOK_VM_INITIALIZE and user_info: None (oneshot: False) DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.commit_to_db (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::CENTRALDB [REGISTER_VMS]:

DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method vm_initialized registered in hook with name HOOK_VM_INITIALIZE and user_info: None (oneshot: False) WARNING ::2015-03-16 10:54:19::utils.py:74::TNArchipelVirtualMachine.set_oom_info (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::OOM: No valid PID. storing value only on database: list index out of range INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.vm_initialized (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::OOM: information for vm with uuid 657842ca-cbc2-11e4-b36e-441ea13b7101 have been removed. DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method awake_from_initialization registered in hook with name HOOK_VM_INITIALIZE and user_info: None (oneshot: False) DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method manage_vcard_hook registered in hook with name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED and user_info: None (oneshot: False) INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.manage_vcard (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::VCARD: Asking for own vCard. DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method add_jid_hook registered in hook with name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED and user_info: admin@xxx.yyy.zzz/ArchipelController (oneshot: True) INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.add_jid (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::adding JID admin@xxx.yyy.zzz to roster of 657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.subscribe (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor is subscribing to jid admin@xxx.yyy.zzz INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.push_change (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PUSH : pushing archipel:push:subscription->added INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: this hook was oneshot. registering for deletion. INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: removing registred hook for deletion add_jid_hook INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.unregister_hook (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: unregistering hook method add_jid_hook for hook name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.presencecallback (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PRESENCE : I just set change presence. The result is <presence xmlns="jabber:client" to="657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor" from="657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor" id="dummy#86048#-288">xaNot defined INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.did_receive_vcard (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::VCARD: I already have a vCard.

CyrilPeponnet commented 9 years ago

If vCard doesn't contain virtualmachine or hypervisor un the type filed, only the chat tab will be shown on the UI.

On Mar 16, 2015, at 3:18 AM, ruthger notifications@github.com wrote:

Cyril,

The resetting of the vcard info in the configfile did not help. But I think the problem resides in the ArchipelVirtualMachine.manage_vcard and ArchipelVirtualMachine.did_receive_vcard function. When I create a new vm I get the following results in the archipel.log file. In the log I find that the vCard already exists, but the JID is new. I don't if this is normal behavior...

INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.connect_xmpp (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::Successfully connected to XMPP with JID 657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: going to run methods for hook HOOK_ARCHIPELENTITY_XMPP_CONNECTED INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.auth_xmpp (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::Trying to authentify the client with username 657842ca-cbc2-11e4-b36e-441ea13b7101 and resource hypervisor INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.auth_xmpp (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::Successfully authenticated. INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin centraldb INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin snapshoting INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin oomkiller INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin virtualmachine_appliance INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin vnc INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin hypervisor_network INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin storage INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin vmparking INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PLUGIN: registering stanza handler for plugin xmppserver INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.register_handlers (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::handlers registred INFO ::2015-03-16 10:54:18::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: going to run methods for hook HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED DEBUG ::2015-03-16 10:54:18::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method recover_pubsubs registered in hook with name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED and user_info: None (oneshot: False) DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.recover_pubsubs (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::Here is the final admin list: {u'4f2ed900-bb39-11e4-933e-28924a361270': u'ruthger@xxx.yyy.zzz', u'54d34486-bb39-11e4-9210-28924a361270': u'steffan@xxx.yyy.zzz', 'STATIC_admin@xxx.yyy.zzz': 'admin@xxx.yyy.zzz'} DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method connect_domain registered in hook with name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED and user_info: None (oneshot: False) WARNING ::2015-03-16 10:54:19::utils.py:74::TNArchipelVirtualMachine.connect_domain (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::LIBVIRT: Can't connect to domain with UUID 657842ca-cbc2-11e4-b36e-441ea13b7101 INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.change_presence (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::status change: Not defined show:xa INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: going to run methods for hook HOOK_VM_INITIALIZE DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method hook_vm_event registered in hook with name HOOK_VM_INITIALIZE and user_info: None (oneshot: False) DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.commit_to_db (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::CENTRALDB [REGISTER_VMS]:

DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method vm_initialized registered in hook with name HOOK_VM_INITIALIZE and user_info: None (oneshot: False) WARNING ::2015-03-16 10:54:19::utils.py:74::TNArchipelVirtualMachine.set_oom_info (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::OOM: No valid PID. storing value only on database: list index out of range INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.vm_initialized (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::OOM: information for vm with uuid 657842ca-cbc2-11e4-b36e-441ea13b7101 have been removed. DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method awake_from_initialization registered in hook with name HOOK_VM_INITIALIZE and user_info: None (oneshot: False) DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method manage_vcard_hook registered in hook with name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED and user_info: None (oneshot: False) INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.manage_vcard (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::VCARD: Asking for own vCard. DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: performing method add_jid_hook registered in hook with name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED and user_info: admin@xxx.yyy.zzz/ArchipelController (oneshot: True) INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.add_jid (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::adding JID admin@xxx.yyy.zzz to roster of 657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.subscribe (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor is subscribing to jid admin@xxx.yyy.zzz INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.push_change (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PUSH : pushing archipel:push:subscription->added INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: this hook was oneshot. registering for deletion. INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.perform_hooks (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: removing registred hook for deletion add_jid_hook INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.unregister_hook (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::HOOK: unregistering hook method add_jid_hook for hook name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED DEBUG ::2015-03-16 10:54:19::utils.py:70::TNArchipelVirtualMachine.presence_callback (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::PRESENCE : I just set change presence. The result is xaNot defined INFO ::2015-03-16 10:54:19::utils.py:72::TNArchipelVirtualMachine.did_receive_vcard (657842ca-cbc2-11e4-b36e-441ea13b7101@xxx.yyy.zzz/hypervisor)::VCARD: I already have a vCard.

— Reply to this email directly or view it on GitHub.

ruthger commented 9 years ago

That I know already. I've been testing the vcard using ejabberdctl. I think the problem is in my version mod_admin_extra (current version from svn)

I get the following error: cmd: ejabberdctl get_vcard [user] [host] NICKNAME

Problem 'error {badmatch,[]}' occurred executing the command.
Stacktrace: [{mod_admin_extra,get_vcard_content,3,
                              [{file,"src/mod_admin_extra.erl"},{line,961}]},
             {mod_admin_extra,get_vcard,3,
                              [{file,"src/mod_admin_extra.erl"},{line,934}]},
             {ejabberd_ctl,call_command,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,293}]},
             {ejabberd_ctl,try_call_command,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,269}]},
             {ejabberd_ctl,process2,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,218}]},
             {ejabberd_ctl,process,1,
                           [{file,"src/ejabberd_ctl.erl"},{line,203}]},
             {rpc,'-handle_call_call/6-fun-0-',5,
                  [{file,"rpc.erl"},{line,205}]}]

And I think it's related to the following issue: https://github.com/processone/ejabberd-contrib/issues/21

When I build the mod_admin_extra module I get the following warnings:

Checked out revision 1107.
Recompile: ../../ejabberd-dev/trunk/src/gen_mod
../../ejabberd-dev/trunk/src/gen_mod.erl:176: Warning: regexp:gsub/3: removed in R15; use the re module instead
../../ejabberd-dev/trunk/src/gen_mod.erl:180: Warning: regexp:gsub/3: removed in R15; use the re module instead
Recompile: src/mod_admin_extra
src/mod_admin_extra.erl:123: Warning: a term is constructed, but never used
src/mod_admin_extra.erl:597: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/mod_admin_extra.erl:600: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/mod_admin_extra.erl:871: Warning: regexp:gsub/3: removed in R15; use the re module instead
src/mod_admin_extra.erl:1275: Warning: regexp:split/2: removed in R15; use the re module instead
src/mod_admin_extra.erl:1546: Warning: regexp:first_match/2: removed in R15; use the re module instead
src/mod_admin_extra.erl:1554: Warning: regexp:format_error/1: removed in R15; use the re module instead
src/mod_admin_extra.erl:1558: Warning: regexp:sh_to_awk/1: removed in R15; use the re module instead
src/mod_admin_extra.erl:1560: Warning: regexp:sh_to_awk/1: removed in R15; use the re module instead

Even when I use the patched version shown in the issue the problem resides. Only the list of errors is shorter:

Recompile: src/mod_admin_extra
src/mod_admin_extra.erl:611: Warning: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2
src/mod_admin_extra.erl:614: Warning: crypto:sha/1 is deprecated and will be removed in in a future release; use crypto:hash/2

The problem is that I cannot rollback to the 2.1.13 version (database error) or a working version of mod_admin_extra (package is gone on my machine) anymore.

I have reported my findings in the issue for mod_admin_extra. I hope they can help me.

CyrilPeponnet commented 9 years ago

Hope this will fixed soon. Apparently ejabberd is gone from epel-6 centos repo so I will have to deal with binary installation of the 15.02...

ruthger commented 9 years ago

You try the patch version of mod_admin_extra. It didn't work for my, but maybe I did something wrong. https://github.com/processone/ejabberd-contrib/blob/a8fba1ca304a01dfe372ff4e2b8ee209b20f7dd9/mod_admin_extra/src/mod_admin_extra.erl

CyrilPeponnet commented 9 years ago

I tried with latest 15.02 and new builtin module_install, same thing.

CyrilPeponnet commented 9 years ago

Ok, some progress, I can set the vcard from command line and it's retrieved afterward. So the first init of the vcard somehow fails. I will digg on this.

CyrilPeponnet commented 9 years ago

Works with ejabberd 15.03, proper yaml and mod_admin_extra (even if it crashed on empty vCards).

I didn't test the xmlrpc but I will do that later.