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

Contribute: zfs driver and zfs driver shared over ISCSI #5654

Open
wants to merge 1,725 commits into
base: one-6.2
Choose a base branch
from

Conversation

openmilanese
Copy link

@openmilanese openmilanese commented Nov 29, 2021

I make available my integration work on zfs, based on the ceph driver.

zfs is for single node and zfs_iscsi for shared

https://github.com/openmilanese/zfs_iscsi.git
https://github.com/openmilanese/zfs.git

enabled: true
actions:
change_authentication: true
update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

settings_auth_tab: true
actions:
# Buttons for settings_info_tab
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

# Buttons for settings_config_tab
Settings.change_language: true
Settings.change_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

settings_auth_tab: true
actions:
# Buttons for settings_info_tab
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

User.two_factor_auth: true
# Buttons for settings_config_tab
Settings.change_language: true
Settings.change_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

settings_auth_tab: true
actions:
# Buttons for settings_info_tab
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

settings_showback_tab: true
actions:
# Buttons for settings_info_tab
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

User.two_factor_auth: true
# Buttons for settings_config_tab
Settings.change_language: true
Settings.change_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

# Buttons for settings_config_tab
Settings.change_language: true
Settings.change_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

User.two_factor_auth: true
# Buttons for settings_config_tab
Settings.change_language: true
Settings.change_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

actions:
User.refresh: true
User.create_dialog: true
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

settings_auth_tab: true
actions:
# Buttons for settings_info_tab
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

actions:
User.refresh: true
User.create_dialog: true
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

actions:
# Buttons for settings_info_tab
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

User.two_factor_auth: true
# Buttons for settings_config_tab
Settings.change_language: true
Settings.change_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

actions:
User.refresh: true
User.create_dialog: true
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

actions:
User.refresh: true
User.create_dialog: true
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

actions:
User.refresh: true
User.create_dialog: true
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

User.two_factor_auth: true
# Buttons for settings_config_tab
Settings.change_language: true
Settings.change_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

actions:
User.refresh: true
User.create_dialog: true
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials

actions:
# Buttons for settings_info_tab
User.update_password: true
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

It appears your code contains a hardcoded password. Hardcoded secrets or credentials can allow attackers to bypass authentication methods and perform malicious actions. We recommend revoking access to resources using this credential and storing future credentials in a management service such as AWS Secrets Manager.

Learn more about the use of hardcoded credentials


int rc;

switch (vm->get_state())
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

The switch statement here is missing a default statement. The default statement will catch any case values that are not explicitly handled by a case statement. This prevents bugs if a case value is accidentally forgotten or new enum values are added later

ctxt_dt = Image::str_to_disk_type(ctxt_dt_s);
}

switch(ctxt_dt)
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

The switch statement here is missing a default statement. The default statement will catch any case values that are not explicitly handled by a case statement. This prevents bugs if a case value is accidentally forgotten or new enum values are added later


void NUMAMonitoring::set_huge_page(unsigned int node_id, unsigned long size, unsigned long fr)
{
NUMAMonitoringNode* node;
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

We observed that the presence of non-empty statements like a + b without clear context or purpose within the codebase can lead to potential confusion or misinterpretation. To mitigate this issue, it's advisable to ensure that such statements are appropriately integrated into larger constructs that contribute meaningfully to the program's logic or functionality. This could involve assigning the result of the expression to a variable.


void NUMAMonitoring::set_memory(unsigned int node_id, unsigned long used, unsigned long fr)
{
NUMAMonitoringNode* node;
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

We observed that the presence of non-empty statements like a + b without clear context or purpose within the codebase can lead to potential confusion or misinterpretation. To mitigate this issue, it's advisable to ensure that such statements are appropriately integrated into larger constructs that contribute meaningfully to the program's logic or functionality. This could involve assigning the result of the expression to a variable.

{
int first = -1;

Increment * inc;
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

We observed that the presence of non-empty statements like a + b without clear context or purpose within the codebase can lead to potential confusion or misinterpretation. To mitigate this issue, it's advisable to ensure that such statements are appropriately integrated into larger constructs that contribute meaningfully to the program's logic or functionality. This could involve assigning the result of the expression to a variable.

return -1;
}

VectorAttribute* va;
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

We observed that the presence of non-empty statements like a + b without clear context or purpose within the codebase can lead to potential confusion or misinterpretation. To mitigate this issue, it's advisable to ensure that such statements are appropriately integrated into larger constructs that contribute meaningfully to the program's logic or functionality. This could involve assigning the result of the expression to a variable.

@@ -385,11 +386,11 @@ bool AclManager::oneadmin_authorize(
const PoolObjectAuth& obj_perms,
AuthRequest::Operation op) const
{
if (static_cast<long long int>(op) & 0x10LL) //No lockable object
if (op & 0x10LL) //No lockable object
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

This snippet may contain an accidental use of incorrect operation. Make sure that the operation being performed is in fact what you intended.

@@ -339,7 +358,7 @@ void ImageManager::_mkfs(unique_ptr<image_msg_t> msg)
goto error_fmt;
}

if (image = ipool->get(msg->oid()))
if ((image = ipool->get(msg->oid())))
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

This snippet may contain an accidental use of incorrect operation. Make sure that the operation being performed is in fact what you intended.

return make_affined_topology(sr, affinity, hpsz_kb, do_alloc);
}

if (hpsz_kb != 0 && pp == HostShare::PP_NONE)
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

This snippet may contain an accidental use of incorrect operation. Make sure that the operation being performed is in fact what you intended.

@@ -195,11 +196,11 @@ bool AclManager::authorize(
long long user_req;
long long resource_oid_req;

if (static_cast<long long int>(op) & 0x10LL) //No lockable object
if (op & 0x10LL) //No lockable object
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

This snippet may contain an accidental use of incorrect operation. Make sure that the operation being performed is in fact what you intended.


sr.topology->vector_value("HUGEPAGE_SIZE", hpsz_kb);
hpsz_kb = hpsz_kb * 1024;

std::string policy = sr.topology->vector_value("PIN_POLICY");
HostShare::PinPolicy pp = HostShare::str_to_pin_policy(policy);
if (affinity != -1)
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

This snippet may contain an accidental use of incorrect operation. Make sure that the operation being performed is in fact what you intended.

@@ -375,7 +375,7 @@ void Group::add_admin_rules(int user_id)
NebulaLog::log("GROUP",Log::ERROR,error_msg);
}

// #<uid> VM+NET+IMAGE+TEMPLATE+DOCUMENT+SECGROUP+VROUTER+VMGROUP/@<gid> USE+MANAGE *
// #<uid> VM+NET+IMAGE+TEMPLATE+DOCUMENT+SECGROUP+VROUTER+VMGROUP+BACKUPJOB/@<gid> USE+MANAGE *
if ( aclm->add_rule(
Copy link
Member

Choose a reason for hiding this comment

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

Recommendation generated by Amazon CodeGuru Reviewer. Leave feedback on this recommendation by replying to the comment or by reacting to the comment using emoji.

This snippet may contain an accidental use of incorrect operation. Make sure that the operation being performed is in fact what you intended.

xorel and others added 18 commits April 30, 2024 14:40
- use bundler 2 since ruby 3.2
- detect also rubygems_version
- add mini_portile2, Ubutnu 24.04 did not resolve
- update gems for all
    - login logo
    - sidebar logo
    - loading screen logo
    - favicon
* The custom logo can be set in the `sunstone-views.yaml` file under the `logo:` option.
* Accepted formats are (jpg|jpeg|png)
* Applies to all apps [Sunstone, OneProvision]

Signed-off-by: Victor Hansson <vhansson@opennebula.io>
in TM cloning script 

- Added function get_ds_attribute to tm_common.sh to get a given attribute from a Datastore
- Using falloc preallocation mode on the qemu-img commands since it is faster than using full preallocation
- Note the cloning script when using the TM_MAD = ssh does not use qemu-img command. Instead it uses the tar command, hence it ignores the QCOW2_OPTIONS parameter
- Deleted get_ds_attribute function since it is no longer needed
- SPARSE is inherited from Datastore on oned.conf
- Changed resize statement so it uses same syntax as the clone statement

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
Signed-off-by: David Carracedo <dcarracedo@opennebula.io>
Signed-off-by: Victor Hansson <vhansson@opennebula.io>
Signed-off-by: David Carracedo <dcarracedo@opennebula.io>
Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
The issue is caused by a wrong handling of hash keys in oneflow logic
that assumes vnet IDs are stored in the first position.

co-authored-by: Victor Palma <vpalma@opennebula.io>
co-authored-by: shurkys <shurkys@gmail.com>
* GO api, including backup struct and VM states
* Java api
* remove snapshots on restore_success callback
* fix xmlrpc response in case VM doesn't exists
The Template::remove could crash if user assign Single value to attribute, which is expected to be a Vector, e.g. SCHED_ACTION, PCI, ...

Other minor changes:
* refactor the 'set' method - no need to call private _set
* Simplify some callers of the Template::remove method
This properly loads kvmrc values on attach nic, in particular DEFAULT_ATTACH_NIC_MODEL

(cherry picked from commit cd5527e7d6e89d721938331a56d1679a1c85af4d)
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.

None yet