Vault plugin error: unable to determine plugin type - hashicorp-vault

I am getting this error:
Error writing data to sys/plugins/catalog/example-auth-plugin: Error making API request.
URL: PUT http://127.0.0.1:1234/v1/sys/plugins/catalog/example-auth-plugin
Code: 500. Errors:
* 1 error occurred:
* unable to determine plugin type
After running this command:
# vault write sys/plugins/catalog/example-auth-plugin \
> sha_256="${SHA256}" \
> command="vault-auth-plugin-example"
I am running everything in a container.
podman run \
--rm \
--cap-add=IPC_LOCK \
-p '8200:8200' \
-e 'VAULT_ADDR=127.0.0.1:1234' \
-e 'VAULT_DEV_LISTEN_ADDRESS=127.0.0.1:1234' \
-v './data/:/var/lib/vault' \
-v './code/vault-auth-plugin-example:/etc/vault/plugins/vault-auth-plugin-example' \
-e 'VAULT_LOCAL_CONFIG={"backend": {"file": {"path": "/vault/file"}}, "log_level": "debug", "disable_mlock": true, "listener": [{"tcp": {"tls_disable": true}}], "plugin_directory": "/etc/vault/plugins/", "default_lease_ttl": "168h", "max_lease_ttl": "720h"}' \
--name=dev-pam-vault \
vaultplugin
Vault version: Vault v1.3.0
I did run this command first:
export SHA256=$(shasum -a 256 "/etc/vault/plugins/vault-auth-plugin-example" | cut -d' ' -f1)
I also tried:
# vault write sys/plugins/catalog/example-auth-plugin \
> sha_256="${SHA256}" \
> command="vault-auth-plugin-example"
But then I get this error:
Error writing data to sys/plugin/catalog/example-auth-plugin: Error making API request.
URL: PUT http://127.0.0.1:1234/v1/sys/plugin/catalog/example-auth-plugin
Code: 404. Errors:
* 1 error occurred:
* unsupported path
Any ideas?
Thank you in advance.

Related

FluxCD: create repository failed, unable to unmarshall repository json: unexpected end of JSON input

I'm trying to do
flux bootstrap bitbucket-server \ ✱
--token-auth \
--hostname=bitbucket.org \
--owner=akhateeb \
--username=akhateeb22 \
--repository=flux-fleet \
--branch=main \
--path=apps \
--personal true
but I'm getting the following error:
Any idea what does this error mean and how to get rid of this problem?

ERROR: (gcloud.sql.instances.create) Projects instance [my-project] not found: The requested flag is either misspelled or unsupported by Cloud SQL

When I try to create cloud sql instance using gcloud I got this error. Any thoughts folks?
--database-version=$DB_VERSION \
--cpu=$NUMBER_CPUS \
--memory=$MEMORY_SIZE \
--storage-type=$STORAGE_TYPE \
--storage-size=$STORAGE_SIZE \
--storage-auto-increase \
--database-flags=$DATABASE_FLAGS \
--region=$REGION \
--authorized-networks=$NETWORKS \
--assign-ip \
--project=$PROJECT_ID
It doesnt mater enabled projectId or not in this command
Thanks!

How Can I Debug apiserver Startup When No Logs Are Generated?

I am trying to install the aws-encryption-provider following the steps at https://github.com/kubernetes-sigs/aws-encryption-provider. After I added the --encryption-provider-config=/etc/kubernetes/aws-encryption-provider-config.yaml parameter to /etc/kubernetes/manifests/kube-apiserver.yaml the apiserver process did not restart. Nor do I see any error messages.
What technique can I use to see errors created when apiserver starts?
Realizing that the apiserver is running inside a docker container, I connected to one of my controller nodes using SSH. Then I started a container using the following command to get a shell prompt using the same docker image that apiserver is using.
docker run \
-it \
--rm \
--entrypoint /bin/sh \
--volume /etc/kubernetes:/etc/kubernetes:ro \
--volume /etc/ssl/certs:/etc/ssl/certs:ro \
--volume /etc/pki:/etc/pki:ro \
--volume /etc/pki/ca-trust:/etc/pki/ca-trust:ro \
--volume /etc/pki/tls:/etc/pki/tls:ro \
--volume /etc/ssl/etcd/ssl:/etc/ssl/etcd/ssl:ro \
--volume /etc/kubernetes/ssl:/etc/kubernetes/ssl:ro \
--volume /var/run/kmsplugin:/var/run/kmsplugin \
k8s.gcr.io/kube-apiserver:v1.18.5
Once inside that container, I could run the same command that is setup in kube-apiserver.yaml. This command was:
kube-apiserver \
--encryption-provider-config=/etc/kubernetes/aws-encryption-provider-config.yaml \
--advertise-address=10.250.203.201 \
...
--service-node-port-range=30000-32767 \
--storage-backend=etcd3 \
I elided the bulk of the command since you'll need to get specific values from your own kube-apiserver.yaml file.
Using this technique showed me the error message:
Error: error while parsing encryption provider configuration file
"/etc/kubernetes/aws-encryption-provider-config.yaml": error while parsing
file: resources[0].providers[0]: Invalid value:
config.ProviderConfiguration{AESGCM:(*config.AESConfiguration)(nil),
AESCBC:(*config.AESConfiguration)(nil), Secretbox:(*config.SecretboxConfiguration)
(nil), Identity:(*config.IdentityConfiguration)(nil), KMS:(*config.KMSConfiguration)
(nil)}: provider does not contain any of the expected providers: KMS, AESGCM,
AESCBC, Secretbox, Identity

bitbake error does not apply (enforce with -f)?

I'm adding new patch to gstreamer-plugin-bad.
I use below command to create my patch.
git diff A B > 0040-forenex-victor.patch
Then I move it to source/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad
After that, I add a line in source/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend
SRC_URI_append = " \
file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
file://0001-gst-plugins-bad-fix-incorrect-wayland-protocols-dir.patch \
file://0001-mpegtsmux-Need-get-pid-when-create-streams.patch \
file://0002-mpeg4videoparse-Need-detect-picture-coding-type-when.patch \
file://0003-mpegvideoparse-Need-detect-picture-coding-type-when-.patch \
file://0004-modifiy-the-videoparse-rank.patch \
file://0005-glfilter-Lost-frame-rate-info-when-fixate-caps.patch \
file://0006-camerabin-Add-one-property-to-set-sink-element-for-v.patch \
file://0007-Fix-for-gl-plugin-not-built-in-wayland-backend.patch \
file://0008-Support-fb-backend-for-gl-plugins.patch \
file://0009-Change-wayland-default-res-to-1024x768.patch \
file://0010-gl-wayland-fix-loop-test-hang-in-glimagesink.patch \
file://0011-Fix-glimagesink-wayland-resize-showed-blurred-screen.patch \
file://0012-Add-directviv-to-glimagesink-to-improve-playback-per.patch \
file://0013-MMFMWK-6930-glplugin-Accelerate-gldownload-with.patch \
file://0014-support-video-crop-for-glimagesink.patch \
file://0015-Add-fps-print-in-glimagesink.patch \
file://0016-glcolorconvert-convert-YUV-to-RGB-use-directviv.patch \
file://0017-glwindow-work-around-for-no-frame-when-imxplayer-use.patch \
file://0018-glcolorconvert-fix-MRT-cannot-work-in-GLES3.0.patch \
file://0019-qmlglplugin-Add-i.mx-specific-code.patch \
file://0020-videocompositor-Remove-output-format-alpha-check.patch \
file://0021-Add-ion-memory-support-for-glupload.patch \
file://0022-Add-ion-dmabuf-support-in-gldownload.patch \
file://0023-qmlglsrc-some-enhancements-for-qmlglsrc.patch \
file://0025-opencv-Add-video-stitching-support-based-on-Open-CV.patch \
file://0026-player-Add-configuration-for-enabling-accurate-seeks.patch \
file://0027-player-Add-get-track-number-media-info-API.patch \
file://0028-Specific-patches-for-gstplayer-API.patch \
file://0029-player-Add-overlayvideorenderer-video-sink.patch \
file://0030-player-Add-get-video-snapshot-API.patch \
file://0032-gstplayer-Add-gst_player_get_state-API.patch \
file://0033-gstplayer-Add-play-stop-sync-API.patch \
file://0035-Fix-6slevk-build-break-when-egl-is-disabled.patch \
file://0036-gst-player-fix-gst-player-failed-to-load-external-su.patch \
file://0037-opencv-allow-compilation-against-3.2.0.patch \
file://0038-MMFMWK-7554-glupload-fix-memory-leak-when-use-a-GVal.patch \
file://0039-glupload-passthrough-composition-caps-features-in-ph.patch \
file://0040-forenex-victor.patch \
"
However, when I bitbake fsl-image-qt5 I got below error.
WARNING: /mnt/raid/forenex/yocto2.4/sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-qt5.bb.do_compile is tainted from a forced run | ETA: 0:00:09
WARNING: /mnt/raid/forenex/yocto2.4/sources/meta-fsl-bsp-release/imx/meta- bsp/recipes-kernel/linux/linux-imx_4.9.11.bb.do_compile is tainted from a forced run
Initialising tasks: 100% |############################################################################### ################################################################################ #####################################| Time: 0:00:12
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: gstreamer1.0-plugins-bad-1.10.4-r0 do_patch: Command Error: 'quilt -- quiltrc /mnt/raid/forenex/yocto2.4/build-wayland-q/tmp/sysroots/x86_64- linux/etc/quiltrc push' exited with 0 Output:
Applying patch 0040-forenex-victor.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/avfvideosrc.m b/oriavfvideosrc.m
|index fdb7b49..4955953 100644
|--- a/avfvideosrc.m
|+++ b/oriavfvideosrc.m
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
Patch 0040-forenex-victor.patch does not apply (enforce with -f)
ERROR: gstreamer1.0-plugins-bad-1.10.4-r0 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /mnt/raid/forenex/yocto2.4/build-wayland-q/tmp/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/gstreamer1.0- plugins-bad/1.10.4-r0/temp/log.do_patch.11145
ERROR: Task (/mnt/raid/forenex/yocto2.4/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5943 tasks of which 5942 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/mnt/raid/forenex/yocto2.4/sources/meta-fsl-bsp-release/imx/meta- bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb:do_patch
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Did I miss anything?
Your steps are correct, however I doubt the way you are generating the patch. You seem to have copied the original file and made changes to original file and then diffing the two. I think an easier way would be to use quit process to generate the patch as described here

Curl error: option-less arguments found

I'm trying to import this example into postman
curl -s --user 'api:YOUR_API_KEY' \
https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages \
-F from='Excited User <mailgun#YOUR_DOMAIN_NAME>' \
-F to=YOU#YOUR_DOMAIN_NAME \
-F to=bar#example.com \
-F subject='Hello' \
-F text='Testing some Mailgun awesomness!'
Please help me understand the -s, --user, -F, what is that? And then when I try to import, I get this error: option-less arguments found. How can I fix this?
If you're trying to execute curl commands in Postman, select Import, then Paste Raw Text and then copy the command, but first remove all backslashes.