I have a similar problem - my build works locally using both the multipass and lxd backends, but fails on Launchpad with a similar error to yours.
snapcraft.yaml: https://github.com/juju-solutions/etcd-snaps/blob/v3.4/snap/snapcraft.yaml
Launchpad build log: https://launchpadlibrarian.net/477678410/buildlog_snap_ubuntu_bionic_amd64_etcd-3.4_BUILDING.txt.gz
Building etcd-wrapper
Staging etcd
Staging etcd-wrapper
Priming etcd
Priming etcd-wrapper
Failed to generate snap metadata: Specified command 'etcdctl' was not found.
Verify the command is correct and for a more deterministic outcome, specify the relative path to the command from the prime directory.
Build failed
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 258, in run
self.build()
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 247, in build
env=env)
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py", line 100, in run_build_command
return self.backend.run(args, env=full_env, **kwargs)
File "/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py", line 537, in run
subprocess.check_call(cmd, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['lxc', 'exec', 'lp-bionic-amd64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-56223100", "build-request-timestamp": "2020-04-30T15:36:13Z", "build_url": "https://launchpad.net/~cdk8s/+snap/etcd-3.4/+build/933402"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy', '--', '/bin/sh', '-c', 'cd /build/etcd && linux64 snapcraft']' returned non-zero exit status 2
@hsanjuan you said you made some changes and got it working. I’d be curious to know what those changes were, if you remember.