<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Is this a known bug in API V11? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Is-this-a-known-bug-in-API-V11/m-p/46812#M43191</link>
    <description>&lt;P&gt;Thanks the wait() worked. But I was wondering what action has wait method. Now i now service start, decommssion etc has wait method but role start stop etc doesn't have wait method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also, is there a timeout function to the wait()&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2016 22:44:43 GMT</pubDate>
    <dc:creator>keagles</dc:creator>
    <dc:date>2016-10-31T22:44:43Z</dc:date>
    <item>
      <title>Is this a known bug in API V11?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-this-a-known-bug-in-API-V11/m-p/46804#M43188</link>
      <description>&lt;P&gt;I ran a API call to decommsion datanode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;HDFS&lt;/SPAN&gt;.decommission(dn.name)&lt;/PRE&gt;&lt;P&gt;I used the following to make sure the role is indeed decomissioned:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;role.commissionState == &lt;SPAN&gt;'DECOMMISSIONED'&lt;/SPAN&gt;:&lt;/PRE&gt;&lt;P&gt;then I will run role deletion:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;HDFS&lt;/SPAN&gt;.delete_role(dn.name)&lt;/PRE&gt;&lt;P&gt;But I got the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Removing datanode roles..Failed to remove datanode role on the host Role hdfs-DATANODE-4a8948d61dc8a4727f810f736d9d3447 has 1 active commands (error 400)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turned out that after commissionState became DECOMMISSONED, the UI still shows the decommisiong command was running for another 10 to 15 seconds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To workaround that, I had to let the prgram sleep for addtional 60 seconds after the decomission status became decomissioned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this a known issue in API v11?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:46:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-this-a-known-bug-in-API-V11/m-p/46804#M43188</guid>
      <dc:creator>keagles</dc:creator>
      <dc:date>2022-09-16T10:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is this a known bug in API V11?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-this-a-known-bug-in-API-V11/m-p/46807#M43189</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you did to work around this is fine. &amp;nbsp;Basically, what you really want to do is wait till the decommission command is complete since Cloudera Manager will not let you delete the role until commands running against that role are complete.&lt;/P&gt;&lt;P&gt;Since "decommission" returns a command object, I imagine you could use the id to query the commands list for that service. &amp;nbsp;I imagine we have some example code for that lying around, but I'm not sure where it is.&lt;/P&gt;&lt;P&gt;Waiting 60 seconds is likely OK, but verifying the command has completed is more sound.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 19:52:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-this-a-known-bug-in-API-V11/m-p/46807#M43189</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2016-10-31T19:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is this a known bug in API V11?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-this-a-known-bug-in-API-V11/m-p/46808#M43190</link>
      <description>&lt;P&gt;I think you can use the wait() method too as demonstrated here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cloudera.github.io/cm_api/docs/python-client/#service-lifecycle-and-commands" target="_blank"&gt;https://cloudera.github.io/cm_api/docs/python-client/#service-lifecycle-and-commands&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 19:55:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-this-a-known-bug-in-API-V11/m-p/46808#M43190</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2016-10-31T19:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is this a known bug in API V11?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-this-a-known-bug-in-API-V11/m-p/46812#M43191</link>
      <description>&lt;P&gt;Thanks the wait() worked. But I was wondering what action has wait method. Now i now service start, decommssion etc has wait method but role start stop etc doesn't have wait method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also, is there a timeout function to the wait()&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 22:44:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-this-a-known-bug-in-API-V11/m-p/46812#M43191</guid>
      <dc:creator>keagles</dc:creator>
      <dc:date>2016-10-31T22:44:43Z</dc:date>
    </item>
  </channel>
</rss>

