cloudius-systems / osv

OSv, a new operating system for the cloud.
osv.io
Other
4.12k stars 605 forks source link

ht_enabled -> smt #1215

Open gohar94 opened 1 year ago

gohar94 commented 1 year ago

Update firecracker config param from ht_enabled to smt.

Fixes the following error:

2023-01-23T03:39:34.650227224 [anonymous-instance:main:ERROR:src/firecracker/src/main.rs:496] Configuration for VMM from one single json failed: Invalid JSON: unknown field `ht_enabled`, expected one of `vcpu_count`, `mem_size_mib`, `smt`, `cpu_
template`, `track_dirty_pages` at line 5 column 18
wkozaczuk commented 1 year ago

Hi, Which firecracker version ht_enabled does not work with? I think it used to work with some versions at some point. Is this mode no longer supported?

gohar94 commented 1 year ago

Hi Waldemar,

This is the relevant changelog: https://github.com/firecracker-microvm/firecracker/blob/6cdbdfe585a6ed159fca762e63e779925fb9feec/CHANGELOG.md

Sent from my iPhone

On Jan 22, 2023, at 11:31 PM, WALDEMAR KOZACZUK @.***> wrote:



Hi, Which firecracker version ht_enabled does not work with? I think it used to work with some versions at some point. Is this mode no longer supported?

— Reply to this email directly, view it on GitHubhttps://github.com/cloudius-systems/osv/pull/1215#issuecomment-1399789520, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABRLZEMARU7RPZM7GQ7TAGTWTYCSBANCNFSM6AAAAAAUDMIO44. You are receiving this because you authored the thread.Message ID: @.***>

gohar94 commented 1 year ago

Specifically: https://github.com/firecracker-microvm/firecracker/blob/6cdbdfe585a6ed159fca762e63e779925fb9feec/CHANGELOG.md#changed-3

Sent from my iPhone

On Jan 23, 2023, at 12:52 AM, Gohar Irfan Chaudhry @.***> wrote:

 Hi Waldemar,

This is the relevant changelog: https://github.com/firecracker-microvm/firecracker/blob/6cdbdfe585a6ed159fca762e63e779925fb9feec/CHANGELOG.md

Sent from my iPhone

On Jan 22, 2023, at 11:31 PM, WALDEMAR KOZACZUK @.***> wrote:



Hi, Which firecracker version ht_enabled does not work with? I think it used to work with some versions at some point. Is this mode no longer supported?

— Reply to this email directly, view it on GitHubhttps://github.com/cloudius-systems/osv/pull/1215#issuecomment-1399789520, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABRLZEMARU7RPZM7GQ7TAGTWTYCSBANCNFSM6AAAAAAUDMIO44. You are receiving this because you authored the thread.Message ID: @.***>

wkozaczuk commented 1 year ago

I see the change. If we apply your patch, the firecracker.py will not work with the older version of firecracker like 0.24.0:

git diff ./scripts/firecracker.py 
diff --git a/scripts/firecracker.py b/scripts/firecracker.py
index 671342e5..67a746f7 100755
--- a/scripts/firecracker.py
+++ b/scripts/firecracker.py
@@ -136,7 +136,7 @@ class ApiClient(object):
         machine_config = {
             'vcpu_count': vcpu_count,
             'mem_size_mib': mem_size_in_mb,
-            'ht_enabled' : False
+            'smt' : False
         }
         if self.socket_less:
             self.firecracker_config['machine-config'] = machine_config

[wkozaczuk@fedora-mbpro osv]$ ./scripts/firecracker.py 
2023-01-23T14:30:12.112112782 [anonymous-instance:ERROR:src/firecracker/src/main.rs:268] Configuration for VMM from one single json failed: InvalidJson

How do we solve this? How do we make it work with all versions of firecracker?