Permission change in plugin.sh script in cyborg/devstack

Bug #1742643 reported by Henry Sun
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cyborg (OpenStack)
Invalid
Undecided
Unassigned

Bug Description

I is my first time to report a bug in Openstack community and I would appreciate any of your advices or instructions.

I tried to start devstack with cyborg with the following additional configuration in local.conf:

    enable_plugin cyborg https://git.openstack.org/openstack/cyborg

However, cyborg project did not run successfully.

This might be result from the permission change to the /opt/stack/cyborg directory in file cyborg/devstack/lib/cyborg, related code of with is shown below:

    sudo chmod 0440 $CYBORG_DIR

This disallows user's permission to exec/write, and therefore prevent run_plugins() in devstack/function-common to execute the script in line 1669:

1668 if [[ -f $dir/devstack/plugin.sh ]]; then
1669 source $dir/devstack/plugin.sh $mode $phase
1670 fi

So when stack.sh exec the script "run_plugins stack extra", cyborg directory could be found by stack.sh but it won't start at all as can be seen from the following logs.

In /opt/stack/logs/stack.sh.log:

2018-01-11 07:44:32.950 | +^[[38;5;242m./stack.sh:main:1357 ^[(B^[[m run_phase stack extra
2018-01-11 07:44:32.958 | +^[[38;5;242mfunctions-common:run_phase:1675 ^[(B^[[m local mode=stack
2018-01-11 07:44:32.966 | +^[[38;5;242mfunctions-common:run_phase:1676 ^[(B^[[m local phase=extra
2018-01-11 07:44:32.974 | +^[[38;5;242mfunctions-common:run_phase:1677 ^[(B^[[m [[ -d /home/ubuntu/devstack/extras.d ]]
2018-01-11 07:44:32.982 | +^[[38;5;242mfunctions-common:run_phase:1678 ^[(B^[[m local extra_plugin_file_name
2018-01-11 07:44:32.990 | +^[[38;5;242mfunctions-common:run_phase:1679 ^[(B^[[m for extra_plugin_file_name in '$TOP_DIR/extras.d/*.sh'
2018-01-11 07:44:32.998 | +^[[38;5;242mfunctions-common:run_phase:1684 ^[(B^[[m local exceptions=80-tempest.sh
2018-01-11 07:44:33.007 | +^[[38;5;242mfunctions-common:run_phase:1685 ^[(B^[[m local extra
2018-01-11 07:44:33.018 | ++^[[38;5;242mfunctions-common:run_phase:1686 ^[(B^[[m basename /home/ubuntu/devstack/extras.d/80-tempest.sh
2018-01-11 07:44:33.026 | +^[[38;5;242mfunctions-common:run_phase:1686 ^[(B^[[m extra=80-tempest.sh
2018-01-11 07:44:33.034 | +^[[38;5;242mfunctions-common:run_phase:1687 ^[(B^[[m [[ 80-tempest.sh =~ 80-tempest\.sh ]]
2018-01-11 07:44:33.041 | +^[[38;5;242mfunctions-common:run_phase:1691 ^[(B^[[m [[ -r /home/ubuntu/devstack/extras.d/80-tempest.sh ]]
2018-01-11 07:44:33.049 | +^[[38;5;242mfunctions-common:run_phase:1691 ^[(B^[[m source /home/ubuntu/devstack/extras.d/80-tempest.sh stack extra
2018-01-11 07:44:33.060 | ++^[[38;5;242mextras.d/80-tempest.sh:source:3 ^[(B^[[m is_service_enabled tempest
2018-01-11 07:44:33.110 | ++^[[38;5;242mfunctions-common:is_service_enabled:1908 ^[(B^[[m return 1
2018-01-11 07:44:33.116 | +^[[38;5;242mfunctions-common:run_phase:1696 ^[(B^[[m [[ stack == \s\o\u\r\c\e ]]
2018-01-11 07:44:33.124 | +^[[38;5;242mfunctions-common:run_phase:1699 ^[(B^[[m [[ stack == \o\v\e\r\r\i\d\e\_\d\e\f\a\u\l\t\s ]]
2018-01-11 07:44:33.132 | +^[[38;5;242mfunctions-common:run_phase:1702 ^[(B^[[m run_plugins stack extra
2018-01-11 07:44:33.139 | +^[[38;5;242mfunctions-common:run_plugins:1661 ^[(B^[[m local mode=stack
2018-01-11 07:44:33.146 | +^[[38;5;242mfunctions-common:run_plugins:1662 ^[(B^[[m local phase=extra
2018-01-11 07:44:33.153 | +^[[38;5;242mfunctions-common:run_plugins:1664 ^[(B^[[m local plugins=,cyborg
2018-01-11 07:44:33.161 | +^[[38;5;242mfunctions-common:run_plugins:1665 ^[(B^[[m local plugin
2018-01-11 07:44:33.168 | +^[[38;5;242mfunctions-common:run_plugins:1666 ^[(B^[[m for plugin in '${plugins//,/ }'
2018-01-11 07:44:33.176 | +^[[38;5;242mfunctions-common:run_plugins:1667 ^[(B^[[m local dir=/opt/stack/cyborg
2018-01-11 07:44:33.182 | +^[[38;5;242mfunctions-common:run_plugins:1668 ^[(B^[[m [[ -f /opt/stack/cyborg/devstack/plugin.sh ]]
2018-01-11 07:44:33.190 | +^[[38;5;242m./stack.sh:main:1365 ^[(B^[[m merge_config_group /home/ubuntu/devstack/local.conf post-extra
2018-01-11 07:44:33.198 | +^[[38;5;242minc/meta-config:merge_config_group:171 ^[(B^[[m local localfile=/home/ubuntu/devstack/local.conf

In /opt/stack/logs/stack.sh.log.summary:

2018-01-11 07:16:45.273 | stack.sh log /opt/stack/logs/stack.sh.log.2018-01-11-071645
2018-01-11 07:17:18.922 | Installing package prerequisites
2018-01-11 07:21:26.641 | cyborg devstack plugin.sh called: stack/pre-install
2018-01-11 07:21:39.288 | Starting RabbitMQ
2018-01-11 07:22:28.764 | Installing OpenStack project source
2018-01-11 07:33:45.050 | cyborg devstack plugin.sh called: stack/install
2018-01-11 07:33:45.183 | Installing Cyborg
2018-01-11 07:34:06.740 | Configuring and starting MySQL
2018-01-11 07:34:15.207 | Starting Keystone
2018-01-11 07:37:22.060 | Configuring Horizon
2018-01-11 07:39:17.014 | Configuring Glance
2018-01-11 07:39:25.567 | Configuring Neutron
2018-01-11 07:40:07.813 | Configuring Cinder
2018-01-11 07:40:14.305 | Configuring Nova
2018-01-11 07:41:16.487 | Configuring placement
2018-01-11 07:41:35.816 | cyborg devstack plugin.sh called: stack/post-config
2018-01-11 07:41:35.957 | Configuring Cyborg
2018-01-11 07:41:39.218 | Starting Glance
2018-01-11 07:41:43.592 | Uploading images
2018-01-11 07:41:46.370 | Starting Nova API
2018-01-11 07:41:55.604 | Starting Neutron
2018-01-11 07:42:00.252 | Starting Placement
2018-01-11 07:42:09.862 | Creating initial neutron network elements
2018-01-11 07:42:59.312 | Starting Nova
2018-01-11 07:43:31.968 | Starting Cinder
2018-01-11 07:43:42.012 | Starting Horizon
2018-01-11 07:44:44.964 | Configuring lvm.conf global device filter
2018-01-11 07:44:45.434 | set lvm.conf device global_filter to: global_filter = [ "a|loop0|", "a|loop1|", "r|.*|" ] # from devstack
2018-01-11 07:44:45.802 | stack.sh completed in 1685 seconds.

Henry Sun (sunjh1999)
summary: - Permission change in devstack plugin.sh script
+ Permission change in cyborg/devstack's plugin.sh script
summary: - Permission change in cyborg/devstack's plugin.sh script
+ Permission change in plugin.sh script in cyborg/devstack
Revision history for this message
Brin Zhang (zhangbailin) wrote :

No we can deploy cyborg in devstack, and wont fond this issue.

Changed in openstack-cyborg:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.