<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Thank you, Gabor. I was able to delete the unneeded resources, and the upgrade has now completed successfully. Much appreciated!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b>From:</b> Gábor Hernádi <gabor.hernadi@linbit.com> <br><b>Sent:</b> Tuesday, April 9, 2019 11:26 PM<br><b>To:</b> Doug Dimick <doug+drbd@dimick.net><br><b>Cc:</b> drbd-user@lists.linbit.com<br><b>Subject:</b> Re: [DRBD-user] Error upgrading linstor controller 0.7.5 > 0.9.5<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>Hello again,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>thanks for sending me the database, I was able to find the bug in our migration as well as a workaround for you until we release a fix for this.<o:p></o:p></p></div><div><p class=MsoNormal>The problem is that you had resources with no volumes in them. The migration basically iterates over all existing volumes using database-joins to gather all data of the corresponding resource, resource-definition and volume-definition. Within this volume-based iteration all data "above" are also created (that means, layer-specific database entries for the volumes themselves, but also for the corresponding resource, its resource definition and volume definition, each only if necessary). <o:p></o:p></p></div><div><p class=MsoNormal>The fact that you had resources with 0 volumes simply prevented the migration to not create any layerData on those resources without volumes, which caused later the NullPointerException as mentioned in my previous mail.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>So the workaround for you is to downgrade and start the previously working version (in your case v0.7.5), and please delete the two resources without volumes (in your case, the "empty" resources had "102" and "202" in their names). It should be safe to delete them as they had no volumes anyways, so there is no data on your disk which will be actually deleted :) (only entries in the linstor database)<o:p></o:p></p></div><div><p class=MsoNormal>The resource-definitions can stay, they do not hurt, just delete the (empty) resources.<o:p></o:p></p></div><div><p class=MsoNormal>Afterwards you should be able to upgrade, start and let the new version migrate everything.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Of course I will start looking in how to fix this so that the next version of linstor can handle this situation out of the box. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for the report,<o:p></o:p></p></div><div><p class=MsoNormal>Best regards,<o:p></o:p></p></div><div><p class=MsoNormal>Gabor<o:p></o:p></p></div></div></div></div></body></html>