<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Il 27/05/2013 18:47, Yair Zaslavsky ha
      scritto:<br>
    </div>
    <blockquote
      cite="mid:826235930.8388311.1369673267649.JavaMail.root@redhat.com"
      type="cite">
      <div style="font-family: times new roman, new york, times, serif;
        font-size: 12pt; color: #000000">
        <div>Please provide select * from vds_spm_id_map</div>
        <div><br>
        </div>
        <div>select task_id,action_type from async_tasks;</div>
        <div><br>
        </div>
        <div>select id,command_id,command_type from
          business_entity_snapshot;</div>
        <div><br>
        </div>
        <div>Thanks.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <hr id="zwchr">
        <blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From:
          </b>"Alessandro Bianchi" <a class="moz-txt-link-rfc2396E" href="mailto:a.bianchi@skynet.it">&lt;a.bianchi@skynet.it&gt;</a><br>
          <b>To: </b><a class="moz-txt-link-abbreviated" href="mailto:users@ovirt.org">users@ovirt.org</a><br>
          <b>Sent: </b>Monday, May 27, 2013 7:26:39 PM<br>
          <b>Subject: </b>[Users] engine-upgrade detect erroneous
          running tasks<br>
          <div><br>
          </div>
          <div id="QCMcontainer"
            style="font-family:sans-serif;font-size:16px;">Hi all<br>
            <br>
            I tried to run engine-upgrade on Fedora 18 but upgrade hangs
            stating for fictious tasks as follows:<br>
            <br>
            2013-05-27 18:12:45::DEBUG::common_utils::434::root::
            Executing command --&gt; '/usr/bin/psql -h localhost -p 5432
            -U engine -d engine -c select command_type, entity_type from
            business_entity_snapshot;'<br>
            2013-05-27 18:12:45::DEBUG::common_utils::472::root:: output
            =  command_type | entity_type <br>
            --------------+-------------<br>
            (0 righe)<br>
            <br>
            <br>
            2013-05-27 18:12:45::DEBUG::common_utils::473::root:: stderr
            = <br>
            2013-05-27 18:12:45::DEBUG::common_utils::474::root::
            retcode = 0<br>
            2013-05-27 18:12:45::DEBUG::engine-upgrade::863::root::
            Still waiting for system tasks to be cleared.<br>
            2013-05-27 18:12:45::DEBUG::common_utils::994::root:: asking
            user: <br>
            Info: The following tasks have been found running in the
            system: <br>
            <br>
            <b>System Tasks:</b><b><br>
            </b><b><br>
            </b><b> command_type | entity_type </b><b><br>
            </b><b>--------------+-------------</b><b><br>
            </b><b>(0 righe)</b> &lt;----- this means 0 rows (system
            uses italian language)<br>
            <br>
            <br>
            <br>
            <br>
            [ May 27 18:12:45 ] Would you like to proceed and try to
            stop tasks automatically?<br>
            (Answering 'no' will stop the upgrade)? (yes|no): <br>
            2013-05-27 18:13:05::DEBUG::common_utils::998::root:: user
            answered: yes<br>
            2013-05-27 18:13:05::DEBUG::engine-upgrade::882::root::
            Retrying to clear system tasks. System will try to clear
            tasks during the next 3 minutes.<br>
            <br>
            2013-05-27 18:16:05::DEBUG::common_utils::481::root::
            running sql query 'select * from fn_db_get_async_tasks();'
            on db server: 'localhost'.<br>
            2013-05-27 18:16:05::DEBUG::common_utils::434::root::
            Executing command --&gt; '/usr/bin/psql -h localhost -p 5432
            -U engine -d engine -c select * from
            fn_db_get_async_tasks();'<br>
            2013-05-27 18:16:05::DEBUG::common_utils::472::root:: output
            =                 dc_id                 | dc_name |
            spm_host_id | spm_host_name | task_count <br>
--------------------------------------+---------+-------------+---------------+------------<br>
             0b6c934f-de25-4de6-b389-cf62b7a9f674 |        
            |             |               |          1<br>
            (1 riga)<br>
            <br>
            <br>
            2013-05-27 18:16:05::DEBUG::common_utils::473::root:: stderr
            = <br>
            2013-05-27 18:16:05::DEBUG::common_utils::474::root::
            retcode = 0<br>
            2013-05-27 18:16:05::DEBUG::common_utils::481::root::
            running sql query 'select command_type, entity_type from
            business_entity_snapshot;' on db server: 'localhost'.<br>
            2013-05-27 18:16:05::DEBUG::common_utils::434::root::
            Executing command --&gt; '/usr/bin/psql -h localhost -p 5432
            -U engine -d engine -c select command_type, entity_type from
            business_entity_snapshot;'<br>
            2013-05-27 18:16:05::DEBUG::common_utils::472::root:: output
            =  command_type | entity_type <br>
            --------------+-------------<br>
            <b>(0 righe)</b><br>
            <br>
            Here is the relevamt rpm list:<br>
            <br>
            ovirt-engine-tools-3.2.1-1.fc18.noarch<br>
            ovirt-engine-3.2.1-1.fc18.noarch<br>
            ovirt-log-collector-3.2.2-1.fc18.noarch<br>
            ovirt-engine-dbscripts-3.2.1-1.fc18.noarch<br>
            ovirt-engine-sdk-3.2.0.11-1.fc18.noarch<br>
            ovirt-engine-setup-plugin-allinone-3.2.2-1.1.fc18.noarch<br>
            ovirt-release-fedora-5-3.noarch<br>
            ovirt-engine-userportal-3.2.1-1.fc18.noarch<br>
            ovirt-engine-restapi-3.2.1-1.fc18.noarch<br>
            ovirt-iso-uploader-3.2.2-1.fc18.noarch<br>
            ovirt-engine-webadmin-portal-3.2.1-1.fc18.noarch<br>
            ovirt-host-deploy-1.0.2-1.fc18.noarch<br>
            ovirt-engine-backend-3.2.1-1.fc18.noarch<br>
            ovirt-engine-cli-3.2.0.12-1.fc18.noarch<br>
            ovirt-host-deploy-offline-1.0.2-1.fc18.noarch<br>
            ovirt-image-uploader-3.2.2-1.fc18.noarch<br>
            ovirt-engine-genericapi-3.2.1-1.fc18.noarch<br>
            ovirt-engine-setup-3.2.2-1.1.fc18.noarch<br>
            ovirt-host-deploy-java-1.0.2-1.fc18.noarch<br>
            <br>
            <br>
            How may I skip/fix this control to let upgrade proceed?<br>
            <br>
            Is there someone else experimenting this "0 rows" 
            detection?<br>
            <br>
            Any advice is higly welcome!<br>
            <br>
            Thank you<br>
            <br>
            Best regards<br>
            <br>
            Alessandro Bianchi<br>
            <br>
          </div>
          <br>
          _______________________________________________<br>
          Users mailing list<br>
          <a class="moz-txt-link-abbreviated" href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
          <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a><br>
        </blockquote>
        <br>
      </div>
    </blockquote>
    Thank you for your answer<br>
    <br>
    Here are the results:<br>
    <br>
    select * from vds_spm_id_map;<br>
               storage_pool_id            | vds_spm_id |               
    vds_id                <br>
--------------------------------------+------------+--------------------------------------<br>
     5849b030-626e-47cb-ad90-3ce782d831b3 |          1 |
    3156bdac-ebfb-44cf-bea6-53d668b74a10<br>
     3935800a-abe4-406d-84a1-4c3c0b915cce |          1 |
    7cd40aed-b3b7-4e3f-85ab-a1e1d9445ea9<br>
     7562ee83-4c7f-4df8-81a5-f638db6be67c |          1 |
    a7e039b5-71b7-42a9-8a23-09fa2fe818f8<br>
     6d565c6e-ce4c-46c6-98ab-a219e2fc3b20 |          1 |
    e4574226-c5db-4f7c-8b16-93d3b9170f01<br>
     5849b030-626e-47cb-ad90-3ce782d831b3 |          2 |
    df401b12-17b5-46fb-988f-c11937cca4f6<br>
    (5 righe)<br>
    <br>
    select task_id,action_type from async_tasks;<br>
                   task_id                | action_type <br>
    --------------------------------------+-------------<br>
     993bea98-b89b-4054-a212-ee4a429f7173 |          36 &lt;--- this one
    is from a dead "local cluster" phisycally (I mean hardware) removed
    I cant' remove from ovirt ( I suppose ) because it says "one host in
    cluster" and I can't switch it to maintenance and remove since it is
    *not present* anymore<br>
    (1 riga)<br>
    <br>
     select id,command_id,command_type from business_entity_snapshot;<br>
     id | command_id | command_type <br>
    ----+------------+--------------<br>
    (0 righe)<br>
    <br>
    So i did<br>
    <br>
    delete from async_tasks where task_id =
    '993bea98-b89b-4054-a212-ee4a429f7173';<br>
    DELETE 1<br>
    <br>
    and tried again but unfortunately:<br>
    <br>
    System Tasks:<br>
    <br>
     command_type | entity_type <br>
    --------------+-------------<br>
    (0 righe)<br>
    <br>
    <br>
    <br>
    <br>
    [ May 27 21:19:16 ] Would you like to proceed and try to stop tasks
    automatically?<br>
    (Answering 'no' will stop the upgrade)? (yes|no): yes<br>
    <br>
    [ May 27 21:19:28 ] System will try to clear tasks during the next 3
    minutes<br>
    <br>
    And everything loops again<br>
    <br>
    Here is the log<br>
    <br>
    2013-05-27 21:22:30::DEBUG::common_utils::473::root:: stderr =<br>
    2013-05-27 21:22:30::DEBUG::common_utils::474::root:: retcode = 0<br>
    2013-05-27 21:22:30::DEBUG::common_utils::481::root:: running sql
    query 'select command_type, entity_type from
    business_entity_snapshot;' on db server: 'localhost'.<br>
    2013-05-27 21:22:30::DEBUG::common_utils::434::root:: Executing
    command --&gt; '/usr/bin/psql -h localhost -p 5432 -U engine -d
    engine -c select command_type, entity_type from
    business_entity_snapshot;'<br>
    2013-05-27 21:22:30::DEBUG::common_utils::472::root:: output = 
    command_type | entity_type<br>
    --------------+-------------<br>
    (0 righe)<br>
    <br>
    <br>
    2013-05-27 21:22:30::DEBUG::common_utils::473::root:: stderr =<br>
    2013-05-27 21:22:30::DEBUG::common_utils::474::root:: retcode = 0<br>
    2013-05-27 21:22:30::DEBUG::engine-upgrade::863::root:: Still
    waiting for system tasks to be cleared.<br>
    2013-05-27 21:22:30::DEBUG::common_utils::994::root:: asking user:<br>
    Info: The following tasks have been found running in the system:<br>
    <br>
    System Tasks:<br>
    <br>
     command_type | entity_type<br>
    --------------+-------------<br>
    (0 righe)<br>
    <br>
    <br>
    <br>
    <br>
    [ May 27 21:22:30 ] Would you like to proceed and try to stop tasks
    automatically?<br>
    (Answering 'no' will stop the upgrade)? (yes|no):<br>
    2013-05-27 21:24:16::DEBUG::common_utils::998::root:: user answered:
    no &lt;--- here I aborted at second request<br>
    2013-05-27 21:24:16::ERROR::engine-upgrade::887::root:: Traceback
    (most recent call last):<br>
      File "/usr/bin/engine-upgrade", line 880, in checkRunningTasks<br>
        raise Exception(MSG_TASKS_STILL_RUNNING % RUNNING_TASKS_MSG)<br>
    Exception:<br>
    There are still running tasks:<br>
    <br>
    <br>
    Thank you<br>
    <br>
    Alessandro Bianchi<br>
    <div class="moz-signature">-- <br>
      <meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
      <title></title>
      <meta name="generator" content="Bluefish 2.0.3">
      <meta name="author" content="Alessandro">
      <meta name="CREATED" content="20100306;9474300">
      <meta name="CHANGEDBY" content="Alessandro ">
      <meta name="CHANGED" content="20100306;10212100">
      <style type="text/css">
        <!--
                P { font-family: "Arial", "Helvetica", sans-serif; font-size: 10pt }
                P.nome { color: #ff8000; font-family: "Arial", "Helvetica", sans-serif; font-size: 12pt; font-weight: bold; text-align: center }
                P.indirizzo { color: #0084d1; font-family: "Arial", "Helvetica", sans-serif; font-size: 10pt; font-weight: bold; line-height: 0.48cm; text-align: center }
                P.info { color: #b3b3b3; font-family: "Arial", "Helvetica", sans-serif; font-size: 9pt }
                A:link { color: #005dff; text-decoration: none }
                A:visited { color: #005dff; text-decoration: none }
        -->
        </style>
      <p class="nome">SkyNet SRL</p>
      <p class="indirizzo">Via Maggiate 67/a - 28021 Borgomanero (NO) -
        tel.
        +39 0322-836487/834765 - fax +39 0322-836608</p>
      <p align="CENTER"><a href="http://www.skynet.it/">http://www.skynet.it</a></p>
      <p class="indirizzo">Autorizzazione Ministeriale n.197</p>
      <p class="info">Le informazioni contenute in questo messaggio sono
        riservate e confidenziali ed è vietata la diffusione in
        qualunque
        modo eseguita.<br>
        Qualora Lei non fosse la persona a cui il presente
        messaggio è destinato, La invitiamo ad eliminarlo ed a
        distruggerlo
        non divulgandolo, dandocene gentilmente comunicazione. <br>
        Per
        qualsiasi informazione si prega di contattare <a class="moz-txt-link-abbreviated" href="mailto:info@skynet.it">info@skynet.it</a>
        (e-mail dell'azienda). Rif. D.L. 196/2003</p>
    </div>
  </body>
</html>