<div dir="ltr"><div><div>Hello,<br><br>To refresh quota usage in the Nova, we are able to use 2 parameters which are:<br><br>   until_refresh<br>   max_age<br><br>   * We can also use setting less than 0 in ""quota_usage.in_use""<br><br></div>Reading this Blog Post which is quite nice to be honest, <br><br>   <a href="http://www.dorm.org/blog/nova-max_age-and-until_refresh-settings-for-easing-quotas-pain/">http://www.dorm.org/blog/nova-max_age-and-until_refresh-settings-for-easing-quotas-pain/</a><br><br></div><div>It will happen to refresh quota when ""max_age"" or ""until_refresh"" is reached to the number you set.<br></div><div><br>    """<br>    When used together, the quota usage will be refreshed when either method is<br>    triggered: when the max_age or the until_refresh count is reached, whichever <br>    comes first.<br>    """<br><br></div><div>But seeing this, it seems not to be able to use both.<br><br></div><div><div>   <a href="https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L3455-L3463">https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L3455-L3463</a><br clear="all"><br></div><div>If you're using ""until_refresh"", this block will be evaluated:<br><br>  elif quota_usage.until_refresh is not None:<br><br></div><div>If you're using ""max_age"", this block will be evaluated unless you are not using ""until_refresh""<br><br>  elif max_age and (timeutils.utcnow()<br>             quota_usage.updated_at).seconds >= max_age:<br><br></div><div>If I've been missing anything, please point it out to me.<br></div><div>It's important since the Nova quota usage is a bit tricky thing to me...<br><br></div><div>Thank you,<br></div><div>Shinobu<br></div><div><br></div><div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Email:<br><a href="mailto:shinobu@linux.com" target="_blank">shinobu@linux.com</a><br></div><div>GitHub:<br><a href="https://github.com/shinobu-x/" target="_blank">shinobu-x</a><br>Blog:<br></div><div><a href="http://i-shinobu.hatenablog.com/" target="_blank">Life with Distributed Computational System based on OpenSource</a><br></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div>