Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Module not Built - Cannot Use without Kube #43

Open
Illydth opened this issue Apr 11, 2018 · 4 comments
Open

Docker Module not Built - Cannot Use without Kube #43

Illydth opened this issue Apr 11, 2018 · 4 comments

Comments

@Illydth
Copy link

Illydth commented Apr 11, 2018

The Makefile does not have a build path for building the docker.so module for this container.

Therefor use of attempted use of CRUNCHY_WATCH_PLATFORM=docker results in a Seg Fault.

pgwatch_pgwatcher.1.25qgkikv4am8@stldopsdock02    | plugin.Open(/opt/cpm/bin/crunchy-watch/plugins/docker.so): realpath failed
pgwatch_pgwatcher.1.25qgkikv4am8@stldopsdock02    | panic: runtime error: invalid memory address or nil pointer dereference
pgwatch_pgwatcher.1.25qgkikv4am8@stldopsdock02    | [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1571ebe]
pgwatch_pgwatcher.1.25qgkikv4am8@stldopsdock02    |
pgwatch_pgwatcher.1.25qgkikv4am8@stldopsdock02    | goroutine 1 [running]:
pgwatch_pgwatcher.1.25qgkikv4am8@stldopsdock02    | main.loadPlatformModule(0x7ffc0778ae27, 0x6, 0xc4200dbe08, 0x1)
pgwatch_pgwatcher.1.25qgkikv4am8@stldopsdock02    | 	/home/dwagneradm/buildenv/cdev/src/github.com/crunchydata/crunchy-watch/util.go:42 +0x1de
pgwatch_pgwatcher.1.25qgkikv4am8@stldopsdock02    | main.main()
pgwatch_pgwatcher.1.25qgkikv4am8@stldopsdock02    | 	/home/dwagneradm/buildenv/cdev/src/github.com/crunchydata/crunchy-watch/main.go:229 +0x316
@Illydth
Copy link
Author

Illydth commented Apr 11, 2018

And adding the following makefile stanza causes the build process to blow up with:

modules: kube-module openshift-module docker-module

docker-module:
	@echo "Building Docker module..."
	@go build -buildmode=plugin \
		-o $(BIULD_DIR)/plugins/docker.so \
		-ldflags='-s -w' \
		plugins/docker/*.go

go install command-line-arguments: mkdir /plugins/: permission denied
make[2]: *** [docker-module] Error 1

And when manually making the docker plugin, it basically doesn't function...recognizes the primary is down, never attempts to do anything and never recognizes multiple attempts...which is obvious given the lack of code in the docker plugin.

If this is only going to work with Kubernetes, why have any examples or information about running this in a normal non-kube environment in your projects at all?

@davecramer
Copy link
Contributor

@Illydth you misspelled BUILD_DIR ...

@abrightwell
Copy link
Member

@Illydth - Thanks for the feedback.

The original intent was to have it work with multiple platforms and environments. Specifically, this is the reason for the 'plugin' architecture to facilitate extending functionality. Kubernetes was the priority use case, however, docker was initially one of the targets. Unfortunately, it wasn't completed (though PR's are always welcome. ;-) ). In the meantime, I'll push to remove references to 'docker' and will add completing the docker support to the list.

@Illydth
Copy link
Author

Illydth commented May 15, 2018

@davecramer Yep, you are 100% correct on the misspelled "Build" in the Makefile. It still doesn't function however since the docker.so file has no code in it. :)

But yea, the misspelling is most definitely a problem on my part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants