<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 06/12/2014 08:27 PM, GHANSHYAM MANN
      wrote:<br>
    </div>
    <blockquote
cite="mid:CACE3TKVetqiyD8zYR5Ytr1dnKEsF=tNOwvCqT=mo4YBtAaSbHw@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Fri, Jun 13, 2014 at 8:42 AM,
            Christopher Yeoh <span dir="ltr"><<a
                moz-do-not-send="true" href="mailto:cbkyeoh@gmail.com"
                target="_blank">cbkyeoh@gmail.com</a>></span> wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="ltr">
                <div class="gmail_extra">
                  <div class="gmail_quote">On Fri, Jun 13, 2014 at 7:05
                    AM, David Kranz <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:dkranz@redhat.com" target="_blank">dkranz@redhat.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div>On 06/12/2014 05:27 PM, Jay Pipes wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          On 06/12/2014 05:17 PM, David Kranz wrote:<br>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            Tempest has a number of tests in various
                            services for deleting objects<br>
                            that mostly return 204. Many, but not all,
                            of these tests go on to check<br>
                            that the resource was actually deleted but
                            do so in different ways.<br>
                            Sometimes they go into a timeout loop
                            waiting for a GET on the object to<br>
                            fail. Sometimes they immediately call DELETE
                            again or GET and assert<br>
                            that it fails. According to what I can see
                            about the HTTP "spec", 204<br>
                            should mean that the object was deleted. So
                            is waiting for something to<br>
                            disappear unnecessary? Is immediate
                            assertion wrong? Does this behavior<br>
                            vary service to service? We should be as
                            consistent about this as<br>
                            possible but I am not sure what the expected
                            behavior of all services<br>
                            actually is.<br>
                          </blockquote>
                          <br>
                          The main problem I've seen is that while the
                          resource is deleted, it stays in a deleting
                          state for some time, and quotas don't get
                          adjusted until the server is finally set to a
                          terminated status.<br>
                        </blockquote>
                      </div>
                      So you are talking about nova here. In tempest I
                      think we need to more clearly distinguish when
                      delete is being called to test the delete api vs.
                      as part of some cleanup. There was an irc
                      discussion related to this recently.  The question
                      is, if I do a delete and get a 204, can I expect
                      that immediately doing another delete or get will
                      fail? And that question needs an answer for each
                      api that has delete in order to have proper tests
                      for delete.<span><font color="#888888"><br>
                        </font></span></blockquote>
                    <div><br>
                    </div>
                    <div>So if the deletion does not occur before the
                      call returns the API should be returning 202
                      rather than 204. The tasks API should help clarify
                      things here as a task handle will be returned for
                      long running things and you can query progress
                      rather than polling by listing objects etc.<br>
                      <br>
                    </div>
                    <div>Chris<br>
                    </div>
                  </div>
                </div>
              </div>
              <br>
            </blockquote>
            <div style="">I was also going through the testing of delete
              operation in tempest and there is not much consistency.</div>
            <div style="">If *strictly* testing, we should not have any
              wait for 204 response. If any operation still in progress
              and return 204 then its a false return  and tempest should
              be able to catch those as it can break user app also.
              Tempest should report fail so that specific project can
              fix that operation or return code (exception in case of
              backward compatibility).</div>
            <div style=""><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Right. I think it makes sense for all the delete apis that return
    204 to have tests that try to do another delete immediately and also
    do a get. But for reasons Jay pointed out we will have to leave the
    "cleanup" deletes doing a loop check.<br>
    <br>
     -David<br>
    <blockquote
cite="mid:CACE3TKVetqiyD8zYR5Ytr1dnKEsF=tNOwvCqT=mo4YBtAaSbHw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div style="">Ghanhsyam Mann</div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
              OpenStack-dev mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev"
                target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
              <br>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div dir="ltr">
            <div>Thanks & Regards</div>
            <div>Ghanshyam Mann</div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>