Skip to content

Remove the rule(s) validation with api names while importing a role#4840

Merged
yadvr merged 1 commit into
apache:4.15from
shapeblue:cs-import-role-remove-api-name-validation
Mar 29, 2021
Merged

Remove the rule(s) validation with api names while importing a role#4840
yadvr merged 1 commit into
apache:4.15from
shapeblue:cs-import-role-remove-api-name-validation

Conversation

@sureshanaparti

Copy link
Copy Markdown
Contributor

Description

This PR removes the rule(s) validation with api names while importing a role. This will be in sync with the current create role permission behavior.

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?

Manually tests:

  • Import role with some random rule string

… be in sync with the create role permission behavior
@shwstppr shwstppr added this to the 4.15.1.0 milestone Mar 18, 2021
@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland

Copy link
Copy Markdown
Contributor

This PR removes the rule(s) validation with api names while importing a role. This will be in sync with the current create role permission behavior.

Aren't we fixing the wrong thing here? I'd say add the validation on create role.

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

This PR removes the rule(s) validation with api names while importing a role. This will be in sync with the current create role permission behavior.

Aren't we fixing the wrong thing here? I'd say add the validation on create role.

@DaanHoogland Agree with api validation part. The intent here, is to have the same behavior for rules added through import role and create role permission (where api names are not validated). Otherwise, create role permission can be extended to include the validation for consistency. Also, note that some cmds are added to the API lookup map only when the respective service/plugin is enabled (eg. cloudian connector, kubernetes service, solid fire APIs).

@blueorangutan

Copy link
Copy Markdown

[S] Trillian test result (tid-168)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 101413 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4840-t168-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_extra_config_data.py
Intermittent failure detected: /marvin/tests/smoke/test_human_readable_logs.py
Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_supported_versions.py
Intermittent failure detected: /marvin/tests/smoke/test_loadbalance.py
Intermittent failure detected: /marvin/tests/smoke/test_network.py
Intermittent failure detected: /marvin/tests/smoke/test_password_server.py
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dns.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dnsservice.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_routers.py
Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 60 look OK, 26 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_create_lb_rule_src_nat Failure 308.38 test_loadbalance.py
test_02_create_lb_rule_non_nat Failure 34.63 test_loadbalance.py
test_assign_and_removal_lb Failure 35.60 test_loadbalance.py
test_01_verify_libvirt Error 602.67 test_deploy_virtio_scsi_vm.py
test_02_verify_libvirt_after_restart Error 609.96 test_deploy_virtio_scsi_vm.py
test_03_verify_libvirt_attach_disk Error 605.83 test_deploy_virtio_scsi_vm.py
test_04_verify_guest_lspci Error 698.87 test_deploy_virtio_scsi_vm.py
test_05_change_vm_ostype_restart Error 611.11 test_deploy_virtio_scsi_vm.py
test_06_verify_guest_lspci_again Error 659.83 test_deploy_virtio_scsi_vm.py
ContextSuite context=TestAddConfigtoDeployVM>:setup Error 0.00 test_deploy_vm_extra_config_data.py
test_01_port_fwd_on_src_nat Failure 604.92 test_network.py
test_02_port_fwd_on_non_src_nat Failure 606.99 test_network.py
ContextSuite context=TestPrivateVlansL2Networks>:setup Error 1228.18 test_network.py
test_reboot_router Failure 355.83 test_network.py
test_network_rules_acquired_public_ip_1_static_nat_rule Error 607.47 test_network.py
test_network_rules_acquired_public_ip_2_nat_rule Error 609.03 test_network.py
test_network_rules_acquired_public_ip_3_Load_Balancer_Rule Error 612.12 test_network.py
test_isolate_network_password_server Failure 157.48 test_password_server.py
test_02_vpc_privategw_static_routes Failure 757.24 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 751.52 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Failure 838.13 test_privategw_acl.py
test_01_disableHumanReadableLogs Error 602.68 test_human_readable_logs.py
test_02_enableHumanReadableLogs Error 602.63 test_human_readable_logs.py
test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 Failure 271.31 test_internal_lb.py
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Failure 319.12 test_internal_lb.py
test_03_vpc_internallb_haproxy_stats_on_all_interfaces Error 137.72 test_internal_lb.py
test_04_rvpc_internallb_haproxy_stats_on_all_interfaces Error 170.09 test_internal_lb.py
test_01_deploy_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py
test_02_invalid_upgrade_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_03_deploy_and_upgrade_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py
test_04_deploy_and_scale_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_05_delete_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_06_deploy_invalid_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_08_deploy_and_upgrade_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_01_add_delete_kubernetes_supported_version Error 0.01 test_kubernetes_supported_versions.py
test_router_dhcphosts Failure 157.22 test_router_dhcphosts.py
ContextSuite context=TestRouterDHCPHosts>:teardown Error 167.48 test_router_dhcphosts.py
test_router_dhcp_opts Error 609.10 test_router_dhcphosts.py
test_router_dns_guestipquery Failure 454.60 test_router_dns.py
test_router_dns_guestipquery Failure 454.31 test_router_dnsservice.py
test_02_routervm_iptables_policies Error 661.37 test_routers_iptables_default_policy.py
test_01_single_VPC_iptables_policies Error 723.21 test_routers_iptables_default_policy.py
test_01_isolate_network_FW_PF_default_routes_egress_true Failure 212.46 test_routers_network_ops.py
test_02_isolate_network_FW_PF_default_routes_egress_false Failure 210.79 test_routers_network_ops.py
test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true Failure 244.03 test_routers_network_ops.py
test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false Failure 245.67 test_routers_network_ops.py
test_03_RVR_Network_check_router_state Error 689.47 test_routers_network_ops.py
test_01_router_internal_basic Error 602.73 test_routers.py
test_02_router_internal_adv Error 602.71 test_routers.py
test_04_restart_network_wo_cleanup Error 604.83 test_routers.py
test_01_service_offering_cpu_limit_use Error 100.49 test_service_offerings.py
test_04_change_offering_small Failure 714.96 test_service_offerings.py
test_01_snapshot_root_disk Error 604.84 test_snapshots.py
test_03_ssvm_internals Error 602.73 test_ssvm.py
test_04_cpvm_internals Error 602.78 test_ssvm.py
test_05_stop_ssvm Error 646.29 test_ssvm.py
test_06_stop_cpvm Error 653.43 test_ssvm.py
test_07_reboot_ssvm Error 717.09 test_ssvm.py
test_08_reboot_cpvm Error 624.07 test_ssvm.py
test_09_destroy_ssvm Error 644.20 test_ssvm.py
test_10_destroy_cpvm Error 659.29 test_ssvm.py
test_01_migrate_VM_and_root_volume Error 67.25 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 51.47 test_vm_life_cycle.py
test_01_secure_vm_migration Error 705.85 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 637.23 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 637.13 test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration Error 637.20 test_vm_life_cycle.py
test_10_attachAndDetach_iso Failure 607.85 test_vm_life_cycle.py
test_01_create_vm_snapshots Failure 604.20 test_vm_snapshots.py
test_02_revert_vm_snapshots Failure 601.49 test_vm_snapshots.py
test_03_delete_vm_snapshots Failure 0.01 test_vm_snapshots.py
test_01_create_volume Failure 609.87 test_volumes.py
test_02_attach_volume Failure 606.55 test_volumes.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Error 832.13 test_vpc_redundant.py
test_02_redundant_VPC_default_routes Error 839.49 test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Error 743.07 test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics Error 706.93 test_vpc_redundant.py
test_05_rvpc_multi_tiers Error 799.18 test_vpc_redundant.py
test_05_rvpc_multi_tiers Error 825.13 test_vpc_redundant.py
test_01_VPC_nics_after_destroy Failure 721.24 test_vpc_router_nics.py
test_02_VPC_default_routes Failure 723.24 test_vpc_router_nics.py
test_01_redundant_vpc_site2site_vpn Failure 353.17 test_vpc_vpn.py
test_01_vpc_site2site_vpn_multiple_options Error 254.62 test_vpc_vpn.py
test_01_vpc_site2site_vpn Error 272.54 test_vpc_vpn.py
test_hostha_enable_ha_when_host_disabled Error 1.44 test_hostha_kvm.py
test_hostha_enable_ha_when_host_disconected Error 604.15 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 301.49 test_hostha_kvm.py

@yadvr

yadvr commented Mar 22, 2021

Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@shwstppr shwstppr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM based on changes. Haven't tested

@yadvr

yadvr commented Mar 23, 2021

Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland

Copy link
Copy Markdown
Contributor

This PR removes the rule(s) validation with api names while importing a role. This will be in sync with the current create role permission behavior.

Aren't we fixing the wrong thing here? I'd say add the validation on create role.

@DaanHoogland Agree with api validation part. The intent here, is to have the same behavior for rules added through import role and create role permission (where api names are not validated). Otherwise, create role permission can be extended to include the validation for consistency. Also, note that some cmds are added to the API lookup map only when the respective service/plugin is enabled (eg. cloudian connector, kubernetes service, solid fire APIs).

Ok, @sureshanaparti My preference would be add the checking to the create method, but I won't block for that reason.

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-198)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 116011 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4840-t198-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_extra_config_data.py
Intermittent failure detected: /marvin/tests/smoke/test_human_readable_logs.py
Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_supported_versions.py
Intermittent failure detected: /marvin/tests/smoke/test_loadbalance.py
Intermittent failure detected: /marvin/tests/smoke/test_network.py
Intermittent failure detected: /marvin/tests/smoke/test_password_server.py
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py
Intermittent failure detected: /marvin/tests/smoke/test_resource_accounting.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dns.py
Intermittent failure detected: /marvin/tests/smoke/test_router_dnsservice.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_routers.py
Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 58 look OK, 28 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_create_lb_rule_src_nat Failure 307.80 test_loadbalance.py
test_02_create_lb_rule_non_nat Failure 34.55 test_loadbalance.py
test_assign_and_removal_lb Failure 34.59 test_loadbalance.py
test_01_verify_libvirt Error 603.07 test_deploy_virtio_scsi_vm.py
test_02_verify_libvirt_after_restart Error 609.95 test_deploy_virtio_scsi_vm.py
test_03_verify_libvirt_attach_disk Error 605.97 test_deploy_virtio_scsi_vm.py
test_04_verify_guest_lspci Error 602.01 test_deploy_virtio_scsi_vm.py
test_05_change_vm_ostype_restart Error 616.48 test_deploy_virtio_scsi_vm.py
test_06_verify_guest_lspci_again Error 602.03 test_deploy_virtio_scsi_vm.py
ContextSuite context=TestAddConfigtoDeployVM>:setup Error 0.00 test_deploy_vm_extra_config_data.py
test_01_port_fwd_on_src_nat Failure 605.14 test_network.py
test_02_port_fwd_on_non_src_nat Failure 606.86 test_network.py
ContextSuite context=TestPrivateVlansL2Networks>:setup Error 1227.27 test_network.py
test_reboot_router Failure 358.03 test_network.py
test_network_rules_acquired_public_ip_1_static_nat_rule Error 608.70 test_network.py
test_network_rules_acquired_public_ip_2_nat_rule Error 611.62 test_network.py
test_network_rules_acquired_public_ip_3_Load_Balancer_Rule Error 614.72 test_network.py
test_isolate_network_password_server Failure 157.20 test_password_server.py
test_02_vpc_privategw_static_routes Failure 773.84 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 766.45 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Failure 865.60 test_privategw_acl.py
test_01_disableHumanReadableLogs Error 602.70 test_human_readable_logs.py
test_02_enableHumanReadableLogs Error 602.89 test_human_readable_logs.py
test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 Failure 388.45 test_internal_lb.py
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Failure 489.53 test_internal_lb.py
test_03_vpc_internallb_haproxy_stats_on_all_interfaces Error 135.41 test_internal_lb.py
test_04_rvpc_internallb_haproxy_stats_on_all_interfaces Error 220.41 test_internal_lb.py
test_01_deploy_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_02_invalid_upgrade_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_03_deploy_and_upgrade_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py
test_04_deploy_and_scale_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_05_delete_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_06_deploy_invalid_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_08_deploy_and_upgrade_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_01_add_delete_kubernetes_supported_version Error 0.01 test_kubernetes_supported_versions.py
ContextSuite context=TestResetVmOnReboot>:setup Error 0.00 test_reset_vm_on_reboot.py
ContextSuite context=TestRAMCPUResourceAccounting>:setup Error 0.00 test_resource_accounting.py
ContextSuite context=TestRouterDHCPHosts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDHCPOpts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDns>:setup Error 0.00 test_router_dns.py
ContextSuite context=TestRouterDnsService>:setup Error 0.00 test_router_dnsservice.py
test_02_routervm_iptables_policies Error 661.69 test_routers_iptables_default_policy.py
test_01_single_VPC_iptables_policies Error 720.41 test_routers_iptables_default_policy.py
ContextSuite context=TestIsolatedNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRedundantIsolateNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRouterServices>:setup Error 0.00 test_routers.py
ContextSuite context=TestCpuCapServiceOfferings>:setup Error 0.00 test_service_offerings.py
ContextSuite context=TestServiceOfferings>:setup Error 0.10 test_service_offerings.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
test_03_ssvm_internals Error 603.01 test_ssvm.py
test_04_cpvm_internals Error 602.82 test_ssvm.py
test_05_stop_ssvm Error 692.07 test_ssvm.py
test_06_stop_cpvm Error 733.00 test_ssvm.py
test_07_reboot_ssvm Error 723.56 test_ssvm.py
test_08_reboot_cpvm Error 627.21 test_ssvm.py
test_09_destroy_ssvm Error 665.17 test_ssvm.py
test_10_destroy_cpvm Error 654.73 test_ssvm.py
test_01_migrate_VM_and_root_volume Error 67.17 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 53.17 test_vm_life_cycle.py
test_01_secure_vm_migration Error 702.22 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 637.20 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 637.04 test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration Error 637.07 test_vm_life_cycle.py
test_10_attachAndDetach_iso Failure 607.79 test_vm_life_cycle.py
test_01_create_vm_snapshots Failure 604.63 test_vm_snapshots.py
test_02_revert_vm_snapshots Failure 601.32 test_vm_snapshots.py
test_03_delete_vm_snapshots Failure 0.01 test_vm_snapshots.py
test_01_create_volume Failure 608.77 test_volumes.py
test_02_attach_volume Failure 606.55 test_volumes.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Error 831.01 test_vpc_redundant.py
test_02_redundant_VPC_default_routes Error 833.74 test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Error 748.09 test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics Error 710.93 test_vpc_redundant.py
test_05_rvpc_multi_tiers Error 804.27 test_vpc_redundant.py
test_05_rvpc_multi_tiers Error 831.16 test_vpc_redundant.py
test_01_VPC_nics_after_destroy Failure 746.12 test_vpc_router_nics.py
test_02_VPC_default_routes Failure 727.99 test_vpc_router_nics.py
test_01_redundant_vpc_site2site_vpn Failure 348.41 test_vpc_vpn.py
test_01_vpc_site2site_vpn_multiple_options Error 256.10 test_vpc_vpn.py
test_01_vpc_site2site_vpn Error 308.57 test_vpc_vpn.py
test_hostha_enable_ha_when_host_disabled Error 1.48 test_hostha_kvm.py
test_hostha_enable_ha_when_host_disconected Error 604.20 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 305.80 test_hostha_kvm.py

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-233)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39249 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4840-t233-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_usage.py
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 71.26 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 49.06 test_vm_life_cycle.py

@shwstppr

Copy link
Copy Markdown
Contributor

@DaanHoogland

This PR removes the rule(s) validation with api names while importing a role. This will be in sync with the current create role permission behavior.

Aren't we fixing the wrong thing here? I'd say add the validation on create role.

@DaanHoogland Agree with api validation part. The intent here, is to have the same behavior for rules added through import role and create role permission (where api names are not validated). Otherwise, create role permission can be extended to include the validation for consistency. Also, note that some cmds are added to the API lookup map only when the respective service/plugin is enabled (eg. cloudian connector, kubernetes service, solid fire APIs).

Ok, @sureshanaparti My preference would be add the checking to the create method, but I won't block for that reason.

@DaanHoogland do you approve the changes then?

@yadvr yadvr requested a review from DaanHoogland March 24, 2021 06:55
@yadvr

yadvr commented Mar 24, 2021

Copy link
Copy Markdown
Member

ping @DaanHoogland are you LGTM with the PR?

@DaanHoogland

Copy link
Copy Markdown
Contributor

Said, I don't block this in favour of timeliness but:

No, I think validation should be done both in this functionality and in the case of createRole.
I have the uneasy feeling this is the removal of a feature because it blocks a single user. I do not see how we can justify that. Is there a larger use-case of which this is part that justifies it? and can we solve that in an other way?

I think the validation should be more thorough rather than be removed (I.E. make sure a glob resolves to an API before allowing it)

As said, I won't block. I don't have a real world example of a user/use-case to argue we should block this, so merge if you disagree.

@yadvr

yadvr commented Mar 29, 2021

Copy link
Copy Markdown
Member

@DaanHoogland the justification is that when adding any rule, the rule string is not validated (i.e. check if the API exists in the system/plugins) which is because some APIs get activated via a global setting or on external jar/plugin. Therefore we must relax with the similar logic for the import role feature (that imports a csv with list of role rule strings, i.e. don't fail if an API doesn't exist in the system).

@yadvr

yadvr commented Mar 29, 2021

Copy link
Copy Markdown
Member

Merging as Daan hasn't blocked, on tests and 2 lgtms.

@yadvr yadvr merged commit 8911111 into apache:4.15 Mar 29, 2021
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.

5 participants