<div dir="ltr"><div>Hello,</div><div><br></div><div>SQLAlchemy 1.4 requested some adaptations in various places (oslo.db, nova, cinder etc).</div><div><br></div><div>Without digging into your issue, oslo.db 8.6.0 at least is required to support this version of SQLAlchemy [1].</div><div><br></div><div>Also you should notice that various patches are required on Nova and other services too [2][3][4][5]. I think that the services deliverables (nova, cinder, etc) should be released to propagate their fixes more widely and surely fix your context.<br></div><div><br></div><div>For further reading please have a look to [6].<br></div><div><br></div><div>[1] <a href="https://review.opendev.org/c/openstack/releases/+/788488">https://review.opendev.org/c/openstack/releases/+/788488</a></div><div><span id="gmail-output">[2] <a href="https://review.opendev.org/c/openstack/nova/+/788471">https://review.opendev.org/c/openstack/nova/+/788471</a><br></span></div><div><span id="gmail-output">[3] <a href="https://review.opendev.org/c/openstack/placement/+/789921">https://review.opendev.org/c/openstack/placement/+/789921</a><br></span></div><div><span id="gmail-output">[4] <a href="https://review.opendev.org/c/openstack/masakari/+/790216">https://review.opendev.org/c/openstack/masakari/+/790216</a></span></div><div><span id="gmail-output">[5] <a href="https://review.opendev.org/c/openstack/cinder/+/790797">https://review.opendev.org/c/openstack/cinder/+/790797</a></span></div><div><span id="gmail-output">[6] <a href="https://review.opendev.org/c/openstack/requirements/+/788339">https://review.opendev.org/c/openstack/requirements/+/788339</a></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 18 mai 2021 à 13:57, tjoen <<a href="mailto:tjoen@dds.nl">tjoen@dds.nl</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Python-3.9.4<br>
nova-23.0.1<br>
oslo.db-8.5.0<br>
SQLAlchemy-1.4.15<br>
<br>
<a href="http://docs.openstack.org/install-guide/launch-instance-provider.html" rel="noreferrer" target="_blank">docs.openstack.org/install-guide/launch-instance-provider.html</a><br>
$ openstack server list<br>
Status is SHUTDOWN<br>
$ openstack server start provider-instance<br>
results in<br>
site-packages/oslo_db/sqlalchemy/update_match.py", line 489, in<br>
   _update_context.statement.froms[0]<br>
ERROR nova.api.openstack.wsgi AttributeError: 'QueryContext' object<br>
          has no attribute 'statement'<br>
<br>
site-packages/oslo_db/sqlalchemy/update_match.py  line 488 and 489:<br>
     context = query._compile_context()<br>
     primary_table = context.statement.froms[0]<br>
<br>
site-packages/sqlalchemy/orm/query.py<br>
     def _compile_context(self, for_statement=False):<br>
         compile_state = self._compile_state(for_statement=for_statement)<br>
         context = QueryContext(<br>
         context = QueryContext(<br>
             compile_state,<br>
             compile_state.statement,<br>
             self._params,<br>
             self.session,<br>
             self.load_options,<br>
         )<br>
         return context<br>
<br>
nova, oslo.db or SQLAlchemy bug?<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" 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>Hervé Beraud</div><div>Senior Software Engineer at Red Hat</div><div>irc: hberaud</div><div><a href="https://github.com/4383/" target="_blank">https://github.com/4383/</a></div><div><a href="https://twitter.com/4383hberaud" target="_blank">https://twitter.com/4383hberaud</a><br></div><div>-----BEGIN PGP SIGNATURE-----<br><br>wsFcBAABCAAQBQJb4AwCCRAHwXRBNkGNegAALSkQAHrotwCiL3VMwDR0vcja10Q+<br>Kf31yCutl5bAlS7tOKpPQ9XN4oC0ZSThyNNFVrg8ail0SczHXsC4rOrsPblgGRN+<br>RQLoCm2eO1AkB0ubCYLaq0XqSaO+Uk81QxAPkyPCEGT6SRxXr2lhADK0T86kBnMP<br>F8RvGolu3EFjlqCVgeOZaR51PqwUlEhZXZuuNKrWZXg/oRiY4811GmnvzmUhgK5G<br>5+f8mUg74hfjDbR2VhjTeaLKp0PhskjOIKY3vqHXofLuaqFDD+WrAy/NgDGvN22g<br>glGfj472T3xyHnUzM8ILgAGSghfzZF5Skj2qEeci9cB6K3Hm3osj+PbvfsXE/7Kw<br>m/xtm+FjnaywZEv54uCmVIzQsRIm1qJscu20Qw6Q0UiPpDFqD7O6tWSRKdX11UTZ<br>hwVQTMh9AKQDBEh2W9nnFi9kzSSNu4OQ1dRMcYHWfd9BEkccezxHwUM4Xyov5Fe0<br>qnbfzTB1tYkjU78loMWFaLa00ftSxP/DtQ//iYVyfVNfcCwfDszXLOqlkvGmY1/Y<br>F1ON0ONekDZkGJsDoS6QdiUSn8RZ2mHArGEWMV00EV5DCIbCXRvywXV43ckx8Z+3<br>B8qUJhBqJ8RS2F+vTs3DTaXqcktgJ4UkhYC2c1gImcPRyGrK9VY0sCT+1iA+wp/O<br>v6rDpkeNksZ9fFSyoY2o<br>=ECSj<br>-----END PGP SIGNATURE-----<br><br></div></div></div></div></div></div></div></div></div></div></div></div></div>