Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: filter null details during volume to template creation #4794

Merged
merged 1 commit into from Apr 6, 2021

Conversation

shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Mar 11, 2021

Description

Fixes #4628

mysql> describe user_vm_details;
+---------+-----------------+------+-----+---------+----------------+
| Field   | Type            | Null | Key | Default | Extra          |
+---------+-----------------+------+-----+---------+----------------+
| id      | bigint unsigned | NO   | PRI | NULL    | auto_increment |
| vm_id   | bigint unsigned | NO   | MUL | NULL    |                |
| name    | varchar(255)    | NO   |     | NULL    |                |
| value   | varchar(5120)   | YES  |     | NULL    |                |
| display | tinyint(1)      | NO   |     | 1       |                |
+---------+-----------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

mysql> describe vm_template_details;
+-------------+-----------------+------+-----+---------+----------------+
| Field       | Type            | Null | Key | Default | Extra          |
+-------------+-----------------+------+-----+---------+----------------+
| id          | bigint unsigned | NO   | PRI | NULL    | auto_increment |
| template_id | bigint unsigned | NO   | MUL | NULL    |                |
| name        | varchar(255)    | NO   |     | NULL    |                |
| value       | varchar(1024)   | NO   |     | NULL    |                |
| display     | tinyint(1)      | NO   |     | 1       |                |
+-------------+-----------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

While cloud.user_vm_details allows null values to be added for a detail, cloud.vm_template_details doesn't allow null values.
This change filters VM details with null values while creating template from a volume.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Tested on a KVM env,

VM details (Details such as kvm.vnc.address can have NULL value in some scenarios):

MariaDB [cloud]> select * from user_vm_details where vm_id=9\G
*************************** 1. row ***************************
     id: 55
  vm_id: 9
   name: cpuOvercommitRatio
  value: 2.0
display: 1
*************************** 2. row ***************************
     id: 56
  vm_id: 9
   name: customdetail
  value: NULL
display: 1
*************************** 3. row ***************************
     id: 53
  vm_id: 9
   name: memoryOvercommitRatio
  value: 1.0
display: 1
*************************** 4. row ***************************
     id: 54
  vm_id: 9
   name: Message.ReservedCapacityFreed.Flag
  value: false
display: 1
*************************** 5. row ***************************
     id: 57
  vm_id: 9
   name: rootDiskController
  value: osdefault
display: 1
5 rows in set (0.00 sec)

Details with NULL value not shown in the API response

(localcloud) SBCM5> > list virtualmachines id=5c765ef4-3fd5-4da6-833b-1864da28a9c4 
{
  "count": 1,
  "virtualmachine": [
    {
      "account": "admin",
      "affinitygroup": [],
      "cpunumber": 1,
      "cpuspeed": 500,
      "cpuused": "0%",
      "created": "2021-03-11T09:34:38+0000",
      "details": {
        "Message.ReservedCapacityFreed.Flag": "false",
        "cpuOvercommitRatio": "2.0",
        "memoryOvercommitRatio": "1.0",
        "rootDiskController": "osdefault"
      },
      "diskioread": 0,
      "diskiowrite": 0,
      "diskkbsread": 0,
      "diskkbswrite": 0,
      "displayname": "abc",
      "displayvm": true,
      "domain": "ROOT",
      "domainid": "d9a7f35c-7be5-11eb-87d3-1e00b1013ad6",
      "guestosid": "e87691ad-7be5-11eb-87d3-1e00b1013ad6",
      "haenable": false,
      "hypervisor": "KVM",
      "id": "5c765ef4-3fd5-4da6-833b-1864da28a9c4",
      "instancename": "i-2-9-VM",
      "isdynamicallyscalable": false,
      "memory": 512,
      "memoryintfreekbs": 26800,
      "memorykbs": 524288,
      "memorytargetkbs": 524288,
      "name": "abc",
      "networkkbsread": 0,
      "networkkbswrite": 0,
      "nic": [
        {
          "extradhcpoption": [],
          "gateway": "10.1.1.1",
          "id": "cfa414a0-4d1a-47e2-aabb-c484b33009c1",
          "ipaddress": "10.1.1.251",
          "isdefault": true,
          "macaddress": "02:00:51:7e:00:04",
          "netmask": "255.255.255.0",
          "networkid": "5c43ca1e-e39b-494b-adbd-c8f09b9501e6",
          "networkname": "t2-network",
          "secondaryip": [],
          "traffictype": "Guest",
          "type": "Isolated"
        }
      ],
      "osdisplayname": "CoreOS",
      "ostypeid": "e87691ad-7be5-11eb-87d3-1e00b1013ad6",
      "passwordenabled": false,
      "rootdeviceid": 0,
      "rootdevicetype": "ROOT",
      "securitygroup": [],
      "serviceofferingid": "8211efcb-aab3-40fd-99d0-f1d462431e3d",
      "serviceofferingname": "Small Instance",
      "state": "Stopped",
      "tags": [],
      "templatedisplaytext": "coresos-kvm",
      "templateid": "d18f6e11-1e3f-4701-8d04-2bacb2c3f1b7",
      "templatename": "coresos-kvm",
      "userid": "f128bc5c-7be5-11eb-87d3-1e00b1013ad6",
      "username": "admin",
      "zoneid": "3f4d015c-7d6b-4b5e-86b0-79552910f77b",
      "zonename": "pr4710-t3640-kvm-centos7"
    }
  ]
}

Template creation from VM ROOT volume:
Before changes - error:

2021-03-11 09:40:53,404 ERROR [c.c.a.ApiServer] (qtp1233705144-17:ctx-823aead3 ctx-ffd0c119) (logid:454f7d0e) unhandled exception executing api command: [Ljava.lang.String;@264f2ef
com.cloud.utils.exception.CloudRuntimeException: DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: INSERT INTO vm_template_details (vm_template_details.template_id, vm_template_details.name, vm_template_details.value, vm_template_details.display) VALUES (204, _binary'customdetail', null, 1)
	at com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1450)
	at org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase.saveDetails(ResourceDetailsDaoBase.java:147)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at com.sun.proxy.$Proxy85.saveDetails(Unknown Source)
	at com.cloud.storage.dao.VMTemplateDaoImpl.saveDetails(VMTemplateDaoImpl.java:460)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at com.sun.proxy.$Proxy104.saveDetails(Unknown Source)
	at com.cloud.template.TemplateManagerImpl.createPrivateTemplateRecord(TemplateManagerImpl.java:1949)
	at com.cloud.template.TemplateManagerImpl.createPrivateTemplateRecord(TemplateManagerImpl.java:208)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at com.sun.proxy.$Proxy202.createPrivateTemplateRecord(Unknown Source)
	at org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.create(CreateTemplateCmd.java:291)
	at com.cloud.api.dispatch.CommandCreationWorker.handle(CommandCreationWorker.java:47)
	at com.cloud.api.dispatch.DispatchChain.dispatch(DispatchChain.java:37)
	at com.cloud.api.ApiDispatcher.dispatchCreateCmd(ApiDispatcher.java:88)
	at com.cloud.api.ApiServer.queueCommand(ApiServer.java:688)
	at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588)
	at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321)
	at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
	at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131)
	at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
	at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:766)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.sql.SQLIntegrityConstraintViolationException: Column 'value' cannot be null
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
	... 103 more
2021-03-11 09:40:53,424 DEBUG [c.c.a.ApiServlet] (qtp1233705144-17:ctx-823aead3 ctx-ffd0c119) (logid:454f7d0e) ===END===  10.1.0.3 -- GET  name=voltempbefore&displaytext=voltempbefore&ostypeid=e87691ad-7be5-11eb-87d3-1e00b1013ad6&ispublic=true&isfeatured=true&volumeid=44dccf77-750c-4d40-a1dd-fb800635dce2&command=createTemplate&response=json

After changes - no error

(localcloud) SBCM5> > create template name=voltempafter displaytext=voltempafter volumeid=44dccf77-750c-4d40-a1dd-fb800635dce2 ispublic=true isfeatured=true ostypeid=e87691ad-7be5-11eb-87d3-1e00b1013ad6
{
  "template": {
    "account": "admin",
    "bits": 0,
    "created": "2021-03-11T09:57:38+0000",
    "crossZones": false,
    "deployasis": false,
    "details": {
      "Message.ReservedCapacityFreed.Flag": "false",
      "cpuOvercommitRatio": "2.0",
      "memoryOvercommitRatio": "1.0",
      "rootDiskController": "osdefault"
    },
    "directdownload": false,
    "displaytext": "voltempafter",
    "domain": "ROOT",
    "domainid": "d9a7f35c-7be5-11eb-87d3-1e00b1013ad6",
    "downloaddetails": [
      {
        "datastore": "NFS://10.10.0.16/acs/secondary/pr4710-t3640-kvm-centos7/pr4710-t3640-kvm-centos7-sec1",
        "downloadPercent": "100",
        "downloadState": "DOWNLOADED"
      }
    ],
    "format": "QCOW2",
    "hypervisor": "KVM",
    "id": "44824c83-218a-4643-95c4-c6747b206dc3",
    "isdynamicallyscalable": false,
    "isextractable": false,
    "isfeatured": true,
    "ispublic": true,
    "isready": true,
    "name": "voltempafter",
    "ostypeid": "e87691ad-7be5-11eb-87d3-1e00b1013ad6",
    "ostypename": "CoreOS",
    "passwordenabled": false,
    "physicalsize": 1067581440,
    "requireshvm": true,
    "size": 4756340736,
    "sourcetemplateid": "d18f6e11-1e3f-4701-8d04-2bacb2c3f1b7",
    "sshkeyenabled": false,
    "status": "Download Complete",
    "tags": [],
    "templatetype": "USER",
    "zoneid": "3f4d015c-7d6b-4b5e-86b0-79552910f77b",
    "zonename": "pr4710-t3640-kvm-centos7"
  }
}

Fixes apache#4628

mysql> describe user_vm_details;
+---------+-----------------+------+-----+---------+----------------+
| Field   | Type            | Null | Key | Default | Extra          |
+---------+-----------------+------+-----+---------+----------------+
| id      | bigint unsigned | NO   | PRI | NULL    | auto_increment |
| vm_id   | bigint unsigned | NO   | MUL | NULL    |                |
| name    | varchar(255)    | NO   |     | NULL    |                |
| value   | varchar(5120)   | YES  |     | NULL    |                |
| display | tinyint(1)      | NO   |     | 1       |                |
+---------+-----------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

mysql> describe vm_template_details;
+-------------+-----------------+------+-----+---------+----------------+
| Field       | Type            | Null | Key | Default | Extra          |
+-------------+-----------------+------+-----+---------+----------------+
| id          | bigint unsigned | NO   | PRI | NULL    | auto_increment |
| template_id | bigint unsigned | NO   | MUL | NULL    |                |
| name        | varchar(255)    | NO   |     | NULL    |                |
| value       | varchar(1024)   | NO   |     | NULL    |                |
| display     | tinyint(1)      | NO   |     | 1       |                |
+-------------+-----------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

While cloud.user_vm_details allows null values to be added for a detail, cloud.vm_template_details doesn't allow null values.
This change filters vm details with null values while creating template from a volume.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr shwstppr added this to the 4.15.1.0 milestone Mar 11, 2021
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 89

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests [S]

@DaanHoogland
Copy link
Contributor

clgtm, but; while this solves the problem that null values are allowed on volume details and not on template values, this problem is not the root of the issue. Why this discrepancy? I see no reason for the difference and I think we need to address that and not work around it.

@blueorangutan
Copy link

[S] Trillian test result (tid-93)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34973 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4794-t93-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Smoke tests completed. 85 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_migrate_VM_and_root_volume Error 67.15 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 50.07 test_vm_life_cycle.py

.stream()
.filter(map -> map.getValue() != null)
.collect(Collectors.toMap(map -> map.getKey(), map -> map.getValue()));
details.putAll(vmDetails);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shwstppr changes LGTM ,to allow template creation from volume.

Do you know any reason to keep some keys (eg. kvm.vnc.address) with value null? Ideally, value in the details table shouldn't accept null.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly, see my general comment above. #4794 (comment)

@shwstppr shwstppr linked an issue Mar 16, 2021 that may be closed by this pull request
@davidjumani
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

1 similar comment
@blueorangutan
Copy link

@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✖️ centos8 ✔️ debian. SL-JID 181

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✖️ centos8 ✔️ debian. SL-JID 184

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as stated in #4794 (comment), clgtm but i'm going to 👎 this anyway. both templates and volumes must have null either allowed or both must have null not allowed.

@shwstppr
Copy link
Contributor Author

as stated in #4794 (comment), clgtm but i'm going to 👎 this anyway. both templates and volumes must have null either allowed or both must have null not allowed.

@DaanHoogland do you suggest db changes to bring consistency in vm and template details?

@DaanHoogland
Copy link
Contributor

as stated in #4794 (comment), clgtm but i'm going to -1 this anyway. both templates and volumes must have null either allowed or both must have null not allowed.

@DaanHoogland do you suggest db changes to bring consistency in vm and template details?

yes, and first investigate which or the two is the way to go.

@shwstppr shwstppr closed this Mar 25, 2021
@rohityadavcloud
Copy link
Member

I would still accept the PR for defensive changes, i.e. don't return/use null values/details.

@DaanHoogland
Copy link
Contributor

I would still accept the PR for defensive changes, i.e. don't return/use null values/details.

I could live with that if we make sure the alignment is done, @rhtyd

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 313

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-345)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 36738 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4794-t345-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Smoke tests completed. 84 look OK, 2 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestKubernetesCluster>:teardown Error 73.10 test_kubernetes_clusters.py
test_01_migrate_VM_and_root_volume Error 69.20 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 50.04 test_vm_life_cycle.py

@rohityadavcloud
Copy link
Member

@sureshanaparti @DaanHoogland are you lgtm on merging this?

@sureshanaparti
Copy link
Contributor

@sureshanaparti @DaanHoogland are you lgtm on merging this?

yes, code LGTM

@shwstppr can you create an improvement ticket to bring consistency for value in the *_details tables (that it shouldn't accept null), and tag it here.

@rohityadavcloud rohityadavcloud merged commit 1a335e8 into apache:4.15 Apr 6, 2021
@shwstppr
Copy link
Contributor Author

shwstppr commented Apr 6, 2021

@sureshanaparti Created #4897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail to create template from Volumes after upgrade 4.15
6 participants