mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-28 12:31:04 +00:00
libs: Change kv of get_agent_kernel_params to BTreeMap
HashMap cannot guarantee the order. The command line is always changed. This commit change kv of get_agent_kernel_params to BTreeMap to make sure the command line is not changed. Fixes: #10977 Signed-off-by: Hui Zhu <teawater@antgroup.com>
This commit is contained in:
parent
4bb0eb4590
commit
1b4961c9db
@ -4,7 +4,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::fs;
|
||||
use std::io::{self, Result};
|
||||
use std::path::{Path, PathBuf};
|
||||
@ -192,8 +192,8 @@ impl TomlConfig {
|
||||
}
|
||||
|
||||
/// Get agent-specfic kernel parameters for further Hypervisor config revision
|
||||
pub fn get_agent_kernel_params(&self) -> Result<HashMap<String, String>> {
|
||||
let mut kv = HashMap::new();
|
||||
pub fn get_agent_kernel_params(&self) -> Result<BTreeMap<String, String>> {
|
||||
let mut kv = BTreeMap::new();
|
||||
if let Some(cfg) = self.agent.get(&self.runtime.agent_name) {
|
||||
if cfg.debug {
|
||||
kv.insert(LOG_LEVEL_OPTION.to_string(), LOG_LEVEL_DEBUG.to_string());
|
||||
|
Loading…
Reference in New Issue
Block a user