> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pmo/how-to/the-openstacksdk-version-0-39-0-is-required-to-run-pf9-express.md).

# The 'openstacksdk' Version 0.39.0 is Required to Run Pf9-express To Onboard Host.

## Problem

PF9-Express will exit with an error unauthorized request while onboarding a node.

{% tabs %}
{% tab title="None" %}

```none
TASK [pf9-auth : Obtain authentication token from Keystone] *************************************************************************************************************task path: /Users/employee/project/iso.virtualization.pf9-express/roles/pf9-auth/tasks/main.yml:23...Using module file /Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/ansible/modules/cloud/openstack/os_auth.py[localhost] ESTABLISH LOCAL CONNECTION FOR USER: [username][localhost] EXEC /bin/sh -c 'sudo -H -S -p "[sudo via ansible, key=naldnldqiymukuejcpjjybexyiljyqpi] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-naldnldqiymukuejcpjjybexyiljyqpi; /Users/employee/project/iso.virtualization.tools/venv/bin/python'"'"' && sleep 0'The full traceback is:Traceback (most recent call last):File "/tmp/ansible_os_auth_payload_OikK4f/__main__.py", line 61, in mainauth_token=cloud.auth_token,File "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/openstack/cloud/openstackcloud.py", line 639, in auth_tokenreturn self.session.get_token()File "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/keystoneauth1/session.py", line 1205, in get_tokenreturn (self.get_auth_headers(auth) or {}).get('X-Auth-Token')File "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/keystoneauth1/session.py", line 1183, in get_auth_headersreturn auth.get_headers(self, **kwargs)File "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/keystoneauth1/plugin.py", line 95, in get_headerstoken = self.get_token(session)File "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 88, in get_tokenreturn self.get_access(session).auth_tokenFile "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 134, in get_accessself.auth_ref = self.get_auth_ref(session)File "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 208, in get_auth_refreturn self._plugin.get_auth_ref(session, **kwargs)File "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/keystoneauth1/identity/v2.py", line 63, in get_auth_refauthenticated=False, log=False)File "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/keystoneauth1/session.py", line 1131, in postreturn self.request(url, 'POST', **kwargs)File "/Users/employee/project/iso.virtualization.tools/venv/lib/python2.7/site-packages/keystoneauth1/session.py", line 968, in requestraise exceptions.from_response(resp, method, url)Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: [req-id])
```

{% endtab %}
{% endtabs %}

## Environment

* Platform9 Managed OpenStack - v4.0 and Higher
* Platform9 Express

## Cause

The older version of pf9-express imports and uses a python module "shade" which is no longer supported.

## Resolution

There are 2 options available to resolve this issue as highlighted in point no 2 and point no 3 below.

1. Login to the machine you use to run the express code.
2. Complete rebuild of the Express codebase by following the below two steps.
   1. The master branch of the pf9-express repository has the fix available.
   2. Do a complete rebuild with a 'git clone' of the current pf9-express repo

**OR** 3. Edit the Express code on the machine where it's installed by following below steps.

**1.** Edit the pf9-express code to replace 'shade' with 'openstacksdk==0.39.0'. Note the single quotes around this package. That will be needed as part of the bash script syntax. Also,

note that there will be two instances of this step within the code (one for Ubuntu and one

for Centos). Ensure you make the same change in both places.

{% tabs %}
{% tab title="None" %}

```none
# install additional pip-based packages for pkg in 'openstacksdk==0.39.0' docker-py; do
```

{% endtab %}
{% endtabs %}

**2.** Uninstall all previous versions of **openstacksdk** using the command `pip uninstall openstack`. It is important to note that there might be multiple versions of this in the system. The command needs to be repeated to ensure all remnants are gone.

**3.** Run pf9-express without bypassing the prereqs to pick the new changes. i.e without using the '-b' switch in your commands.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://platform9.com/kb/pmo/how-to/the-openstacksdk-version-0-39-0-is-required-to-run-pf9-express.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
