Skip to content

user format data: start_scylla_on_first_boot

Amos Kong edited this page Jan 21, 2021 · 2 revisions

The expected behavior is that, if start_scylla_on_first_boot is set to False in user format data, "/etc/scylla/ami_disabled" will be created It caused the first start fail (exist) in scylla_prepare. and the flag file (ami_disabled) will be cleaned.

get user-data inside the instance:

[scyllaadm@longevity-10gb-3h-master-db-node-408c032c-2 ~]$ curl http://169.254.169.254/latest/user-data
{"scylla_yaml": {"cluster_name": "longevity-10gb-3h-master-db-cluster-408c032c", "auto_bootstrap": true}, "start_scylla_on_first_boot": false, "post_configuration_script": "IyEvYmluL2Jhc2gKc3VkbyBzZWQgLWkgJ3MvI01heFNlc3Npb25zIFwoLipcKSQvTWF4U2Vzc2lvbnMgMTAwMC8nIC9ldGMvc3NoL3NzaGRfY29uZmlnCnN1ZG8gc2VkIC1pICdzLyNNYXhTdGFydHVwcyBcKC4qXCkkL01heFN0YXJ0dXBzIDYwLycgL2V0Yy9zc2gvc3NoZF9jb25maWcKc3VkbyBzZWQgLWkgJ3MvI0xvZ2luR3JhY2VUaW1lIFwoLipcKSQvTG9naW5HcmFjZVRpbWUgMTVzLycgL2V0Yy9zc2gvc3NoZF9jb25maWcKc3VkbyBzeXN0ZW1jdGwgcmVzdGFydCBzc2hkCgpzdWRvIGVjaG8gJ2FjdGlvbih0eXBlPSJvbWZ3ZCIgVGFyZ2V0PSIxMC4wLjIuMTIxIiBQb3J0PSIzMjc2OCIgUHJvdG9jb2w9InRjcCIpJz4+IC9ldGMvcnN5c2xvZy5jb25mCnN1ZG8gc3lzdGVtY3RsIHJlc3RhcnQgcnN5c2xvZwoKc2VkIC1pIC1lICdzL15cKltbOmJsYW5rOl1dKnNvZnRbWzpibGFuazpdXSpucHJvY1tbOmJsYW5rOl1dKjQwOTYvKlx0XHRzb2Z0XHRucHJvY1x0XHR1bmxpbWl0ZWQvJyBcCi9ldGMvc2VjdXJpdHkvbGltaXRzLmQvMjAtbnByb2MuY29uZgplY2hvIC1lICcqXHRcdGhhcmRcdG5wcm9jXHRcdHVubGltaXRlZCcgPj4gL2V0Yy9zZWN1cml0eS9saW1pdHMuZC8yMC1ucHJvYy5jb25mCg=="}
[scyllaadm@longevity-10gb-3h-master-db-node-408c032c-2 ~]$ /opt/scylladb/python3/bin/python3
Python 3.9.0 (default, Oct  6 2020, 00:00:00)
[GCC 10.2.1 20200826 (Red Hat 10.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.append('/opt/scylladb/scripts')
>>> from scylla_util import get_cloud_instance
>>> n = get_cloud_instance()
>>> n.user_data
'{"scylla_yaml": {"cluster_name": "longevity-10gb-3h-master-db-cluster-408c032c", "auto_bootstrap": true}, "start_scylla_on_first_boot": false, "post_configuration_script": "IyEvYmluL2Jhc2gKc3VkbyBzZWQgLWkgJ3MvI01heFNlc3Npb25zIFwoLipcKSQvTWF4U2Vzc2lvbnMgMTAwMC8nIC9ldGMvc3NoL3NzaGRfY29uZmlnCnN1ZG8gc2VkIC1pICdzLyNNYXhTdGFydHVwcyBcKC4qXCkkL01heFN0YXJ0dXBzIDYwLycgL2V0Yy9zc2gvc3NoZF9jb25maWcKc3VkbyBzZWQgLWkgJ3MvI0xvZ2luR3JhY2VUaW1lIFwoLipcKSQvTG9naW5HcmFjZVRpbWUgMTVzLycgL2V0Yy9zc2gvc3NoZF9jb25maWcKc3VkbyBzeXN0ZW1jdGwgcmVzdGFydCBzc2hkCgpzdWRvIGVjaG8gJ2FjdGlvbih0eXBlPSJvbWZ3ZCIgVGFyZ2V0PSIxMC4wLjIuMTIxIiBQb3J0PSIzMjc2OCIgUHJvdG9jb2w9InRjcCIpJz4+IC9ldGMvcnN5c2xvZy5jb25mCnN1ZG8gc3lzdGVtY3RsIHJlc3RhcnQgcnN5c2xvZwoKc2VkIC1pIC1lICdzL15cKltbOmJsYW5rOl1dKnNvZnRbWzpibGFuazpdXSpucHJvY1tbOmJsYW5rOl1dKjQwOTYvKlx0XHRzb2Z0XHRucHJvY1x0XHR1bmxpbWl0ZWQvJyBcCi9ldGMvc2VjdXJpdHkvbGltaXRzLmQvMjAtbnByb2MuY29uZgplY2hvIC1lICcqXHRcdGhhcmRcdG5wcm9jXHRcdHVubGltaXRlZCcgPj4gL2V0Yy9zZWN1cml0eS9saW1pdHMuZC8yMC1ucHJvYy5jb25mCg=="}'