openstack newbie: why give me this error, even if password is correct? - openstack

I have installed openstack following this guide.
Now I want to try a simple cli command
openstack catalog list
I have export all this variables
export HOSTNAME="openstack1"
export OS_AUTH_PLUGIN="token"
export OS_AUTH_URL="http://openstack1:5000/v3/"
export OS_IDENTITY_API_VERSION="3"
export OS_PASSWORD="correctadminpass"
export OS_PROJECT_DOMAIN_ID="default"
export OS_PROJECT_DOMAIN_NAME="mydomain.fqdn"
export OS_SERVICE_ENDPOINT="http://openstack1:5000/v3/"
export OS_SERVICE_TOKEN="1234tokencorrecttakefromkeystone.conf"
export OS_USERNAME="admin"
But the command return this error
openstack catalog list
The request you have made requires authentication. (HTTP 401) (Request-ID: req-3346b80c-0b57-4a7e-a8c9-cf07acb83976)
Is not sufficient to export the OS variables?

It gave you the error because the project was not specified. Openstack authentication requires a username or id, and a project name or id.
Note that:
export OS_PROJECT_NAME="admin"
export OS_TENANT_NAME="admin"
are effectively saying the same thing. "Tenant" is the old terminology for "project".
Please refer to the Openstack command Manual Entry for more details on the environment variables that it recognizes.
Normally, the only URL you need is the URL for Keystone (OS_AUTH_URL). The openstack command can work out how to contact other services from the Keystone catalog.

Solution found, the command
openstack catalog list
return correct output after exporting those variables
export OS_AUTH_URL="http://openstack1.mydomain.priv:5000/v3"
export OS_BOOTSTRAP_PASSWORD="mypass"
export OS_IDENTITY_API_VERSION="3"
export OS_PASSWORD="mypass"
export OS_PROJECT_DOMAIN_ID="default"
export OS_PROJECT_NAME="admin"
export OS_TENANT_NAME="admin"
export OS_USERNAME="admin"
export OS_USER_DOMAIN_ID="default"

Related

How can I resolve the exception reported by rocksdb when using NebulaGraph Exchange?

I want to export data from NebulaGraph and used the configuration file provided by the official documentation.
The core content of the configuration file used in this example is as follows:
# Processing tags
# There are tag config examples for different dataSources.
tags: [
# export NebulaGraph tag data to csv, only support export to CSV for now.
{
name: player
type: {
source: Nebula
sink: CSV
}
# the path to save the NebulaGrpah data, make sure the path doesn't exist.
path:"hdfs://192.168.12.177:9000/vertex/player"
# if no need to export any properties when export NebulaGraph tag data
# if noField is configured true, just export vertexId
noField:false
# define properties to export from NebulaGraph tag data
# if return.fields is configured as empty list, then export all properties
return.fields:[]
# nebula space partition number
partition:10
}
Then I executed the spark task as follows:
./spark-submit --master "local" --class com.vesoft.nebula.exchange.Exchange ~/exchange-ent/nebula-exchange-ent-3.3.0.jar -c ~/exchange-ent/export_application.conf
However, the task fails to be executed, and the following error message is displayed:
org.rocksdb.RocksDBException: While open a file for appending: /path/sst/1-102.sst: No such file or directory
I checked the path and /path/sst/ exists, and I have checked that the permission of this folder also belongs to NebulaGraph.
Could anyone help hint at where I could be wrong?

You must provide a user name/id (via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]) or an auth token (via --os-token)

While trying to run nova command in openstack server, I get this error:
You must provide a user name/id (via --os-username, --os-user-id,
env[OS_USERNAME] or env[OS_USER_ID]) or an auth token (via --os-token).
How could I fix it?
you have to apply openrc file.
this file contains some env vars for user,pass,auth_url and ...
this file looks like this
export OS_USERNAME=username
export OS_PASSWORD=password
export OS_TENANT_NAME=projectName
export OS_AUTH_URL=https://identityHost:portNumber/v2.0
export OS_TENANT_ID=tenantIDString
export OS_REGION_NAME=regionName
export OS_CACERT=/path/to/cacertFile
or you can export one be one in bash. or permanently add to /etc/environment file.

when performing testing, I have `Bucket name not specified or invalid` error after initialize the app in Cloud Function

I know there are a lot of similar thread discussing similar issue, but I still don't find any solution because maybe my case is slightly different.
so I have this error when performing testing using Mocha in Firebase emulator
Error: Bucket name not specified or invalid. Specify a valid bucket
name via the storageBucket option when initializing the app, or
specify the bucket name explicitly when calling the getBucket()
method.
import * as admin from "firebase-admin";
export const app = admin.initializeApp();
const storage = app.storage();
const defaultBucket = storage.bucket(); // it seem error is in here
I am using cloud function, so I assume initializeApp() with empty argument is fine according to the documentation in here. but I have that error when run the test in emulator
my mocha test script is like this
export FIRESTORE_EMULATOR_HOST="localhost:8080" && export FIREBASE_AUTH_EMULATOR_HOST="localhost:9099" && mocha -r ts-node/register src/tests/cloud_function_tests --recursive --extension .test.ts --timeout 60000 --exit
and it seems that error only appears when I perform the testing, if I run those code above using emulator (without mocha testing), that error will never occured
I am using
Node 14
firebase-admin: 9.6.0
firebase-functions: 3.13.2
firebase tools: 9.10.0

ERROR when trying to Create projects in openstack (Missing value auth-url required for auth plugin password )

Openstack | Keystone
I follow above official Openstack documentation to Create projects, users, and roles, I met this error message:
strong textMissing value auth-url required for auth plugin password
I already tried these commands:
$ export | grep OS_
$ declare -x OS_AUTH_URL="http://controller:35357/v3"
And it still did not work, I think it's related to the OS_auth_url
you have to define other OS variable like:
export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=iQds9Glj6QH4
export OS_AUTH_URL=http://openstack.local:35357/v3
export OS_INTERFACE=internal
export OS_IDENTITY_API_VERSION=3
export OS_REGION_NAME=RegionOne
export OS_AUTH_PLUGIN=password123

Integrating Apollo to meteor app

When I'm trying to integrate an apollo server to a meteor app I get errors as soon as I try to open graphiql. If I create an express app and connect it with webapp.connectHandlers, and put apollo server to one of that express app's routes, thing work, but they don't work in "meteor way", which I would really like to have, since I would get access to the user object, authorization etc.
Error, which I see in graphiql as soon as it loads:
Error: Schema must be an instance of GraphQLSchema. Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory
stacktrace:
at invariant (/Users/.../node_modules/graphql/jsutils/invariant.js:18:11)<br> at Object.validate (/Users/.../node_modules/graphql/validation/validate.js:59:72)<br> at doRunQuery (/Users/.../node_modules/apollo-server-core/dist/runQuery.js:88:38)<br> at /Users/.../node_modules/apollo-server-core/dist/runQuery.js:22:54<br> at /Users/.../.meteor/packages/promise/.0.10.0.borizy.o9z8++os+web.browser+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
server code:
import {makeExecutableSchema} from 'graphql-tools';
import {typeDefs} from './schema';
import {resolvers} from './resolvers';
import { createApolloServer } from 'meteor/apollo';
export const schema = makeExecutableSchema({
typeDefs,
resolvers
});
createApolloServer({
schema
});
Everything seems legit and works with express, but not with meteor. What is the reason? How can I fix it?
The current version of meteor/apollo is out of date with the latest apollo npm packages. https://github.com/Swydo/ddp-apollo is up-to-date and does the integration in a "meteor way" 😊
Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory
If this is the problem, it would be solved by
rm -rf node_modules/*
npm install

Resources