Commit 761fbf0c authored by Austin Blatt's avatar Austin Blatt

Merge 6.0.x into master

parents 7048e758 8096712a
docker/puppetdb/* text eol=lf
docker/puppetdb/conf.d/* text eol=lf
docker/puppetdb/logging/* text eol=lf
docker/puppetdb/docker-entrypoint.d/* text eol=lf
......@@ -38,8 +38,7 @@ function Build-Container(
'--build-arg', "build_date=$build_date",
'--build-arg', "version=$Version",
'--file', "puppetdb/Dockerfile",
'--tag', "$Namespace/puppetdb:$Version",
'--tag', "$Namespace/puppetdb:latest"
'--tag', "$Namespace/puppetdb:$Version"
)
docker build $docker_args ..
......
......@@ -70,6 +70,7 @@ VOLUME /etc/puppetlabs/puppet/ssl/
COPY docker/puppetdb/docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
COPY docker/puppetdb/docker-entrypoint.d /docker-entrypoint.d
EXPOSE 8080 8081
......
#!/bin/sh
master_running() {
status=$(curl --silent --fail --insecure "https://${PUPPETSERVER_HOSTNAME}:8140/status/v1/simple")
test "$status" = "running"
}
PUPPETSERVER_HOSTNAME="${PUPPETSERVER_HOSTNAME:-puppet}"
if [ ! -f "/etc/puppetlabs/puppet/ssl/certs/${HOSTNAME}.pem" ] && [ "$USE_PUPPETSERVER" = true ]; then
# if this is our first run, run puppet agent to get certs in place
while ! master_running; do
sleep 1
done
set -e
/ssl.sh
fi
if [ ! -d "/etc/puppetlabs/puppetdb/ssl" ] && [ "$USE_PUPPETSERVER" = true ]; then
/ssl-setup.sh -f
fi
#!/bin/sh
master_running() {
status=$(curl --silent --fail --insecure "https://${PUPPETSERVER_HOSTNAME}:8140/status/v1/simple")
test "$status" = "running"
}
set -e
PUPPETSERVER_HOSTNAME="${PUPPETSERVER_HOSTNAME:-puppet}"
if [ ! -f "/etc/puppetlabs/puppet/ssl/certs/${HOSTNAME}.pem" ] && [ "$USE_PUPPETSERVER" = true ]; then
# if this is our first run, run puppet agent to get certs in place
while ! master_running; do
sleep 1
done
set -e
/ssl.sh
fi
if [ ! -d "/etc/puppetlabs/puppetdb/ssl" ] && [ "$USE_PUPPETSERVER" = true ]; then
/ssl-setup.sh -f
fi
for f in /docker-entrypoint.d/*.sh; do
echo "Running $f"
chmod +x "$f"
"$f"
done
exec java $PUPPETDB_JAVA_ARGS -cp /puppetdb.jar \
clojure.main -m puppetlabs.puppetdb.core "$@" \
......
......@@ -61,11 +61,13 @@ expr-not = ( not, [<whitespace>], expr-not ) | expr-rest;
subquery = entity, [<whitespace>], where;
(* Conditional expression *)
condexpression = (condexpregexp | condexpregexparray | condexpinequality | condexpmatch | condexpin);
condexpression = (condexpregexp | condexpregexparray | condexpinequality | condexpmatch | condexpnotmatch| condexpnotregexp | condexpin);
<condexpregexp> = field, [<whitespace>], condregexp, [<whitespace>], valueregexp;
<condexpregexparray> = field, [<whitespace>], condregexparray, [<whitespace>], valueregexparray;
<condexpinequality> = field, [<whitespace>], condinequality, [<whitespace>], valueordered;
<condexpmatch> = field, [<whitespace>], condmatch, [<whitespace>], literal;
<condexpnotmatch> = field, [<whitespace>], condnotmatch, [<whitespace>], literal;
<condexpnotregexp> = field, [<whitespace>], condnotregexp, [<whitespace>], literal;
<condexpin> = (field | groupedfieldlist), [<whitespace>], condin, [<whitespace>], valuein;
(* Special is null/is not null expression *)
......@@ -95,6 +97,8 @@ field = #'[a-zA-Z0-9_]+\??' | (dottedfield, fieldpath);
<condregexparray> = '~>';
<condinequality> = '>=' | '<=' | '<' | '>';
<condmatch> = '=';
<condnotmatch> = '!=';
<condnotregexp> = '!~';
<condin> = 'in';
<valueregexp> = string;
......
......@@ -54,7 +54,10 @@
(defn transform-condexpression
[a b c]
[b a c])
(case b
"!=" ["not" ["=" a c]]
"!~" ["not" ["~" a c]]
[b a c]))
(defn transform-condexpnull
[entity type]
......
......@@ -345,6 +345,12 @@
"certname > 4"
[:condexpression [:field "certname"] ">" [:integer "4"]]
"certname != 4"
[:condexpression [:field "certname"] "!=" [:integer "4"]]
"certname !~ 4"
[:condexpression [:field "certname"] "!~" [:integer "4"]]
"a in nodes [a] {}"
[:condexpression [:field "a"] "in" [:from "nodes" [:extract [:field "a"]]]])
......
......@@ -59,6 +59,12 @@
["from" "nodes"
["=" "a" 1]]
[:condexpression [:field "certname"] "!=" [:integer "4"]]
["not" ["=" "certname" 4]]
[:condexpression [:field "certname"] "!~" [:integer "4"]]
["not" ["~" "certname" 4]]
[:from "nodes"
[:extract "a" "b" "c"]]
["from" "nodes"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment