Skip to content

Commit

Permalink
Update alpine linux base to 3.7, and dependencies
Browse files Browse the repository at this point in the history
Runtime libraries
- librdkafka (0.9.5-r0 -> 0.11.1-r1)
  * Use of rd_kafka_last_error() instead of global errno
  * Defaulting `queue.buffering.max.ms` to 1000ms
  * Applying topics properties to kafka handler

- musl (1.1.16-r14 -> 1.1.18-r2)

Devel tools
- libatomic (6.3.0-r4 -> 6.4.0-r5)
- gcc (6.3.0-r4 -> 6.4.0-r5)
- fortify-headers (0.8-r0 -> 0.9-r0)
- expat (2.2.0-r1 -> 2.2.5-r0)
- gdb (7.12.1-r1 -> 8.0.1-r3)
- cgdb (0.7.0-r0 -> 0.7.0-r1)
- expat-dev (2.2.0-r1 -> 2.2.5-r0)
- guile (2.0.13-r0 -> 2.0.14-r0)
- libbz2 (1.0.6-r5 -> 1.0.6-r6)
- libarchive-tools (3.3.1-r2 -> 3.3.2-r2)
- net-snmp-libs (5.7.3-r8 -> 5.7.3-r10)
- python3 (3.6.1-r3 -> 3.6.3-r9)
- valgrind (3.12.0-r1)
  • Loading branch information
eugpermar committed Jan 9, 2018
1 parent b8d9303 commit b39dd11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 2 additions & 5 deletions docker/Dockerfile.m4
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
FROM alpine:3.6
FROM alpine:3.7

# envsubst (gettext is very big! install only binary & dependency)
RUN apk add --no-cache libintl gettext && \
cp /usr/bin/envsubst /usr/local/bin/envsubst && \
apk del gettext

# Common C runtime libraries
RUN apk add --no-cache librdkafka jansson zlib

# n2k libraries
RUN apk add --no-cache yajl libmicrohttpd libev
RUN apk add --no-cache librdkafka zlib

# ca-certificates: for wget bootstrapping
# ncurses - expat: deps for xml-coreutils
Expand Down
6 changes: 4 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,7 @@ static int worker_process_sensor_send_array(struct _worker_info *worker_info,
rdlog(LOG_ERR,
"[Kafka] Cannot produce kafka message: "
"%s",
rd_kafka_err2str(rd_kafka_errno2err(
errno)));
rd_kafka_err2str(rd_kafka_last_error()));
}
} /* if kafka */

Expand Down Expand Up @@ -762,6 +761,9 @@ int main(int argc, char *argv[]) {
worker_info.rk_conf = rd_kafka_conf_new();
worker_info.rkt_conf = rd_kafka_topic_conf_new();

// Default to librdkafka pre-0.11 behavior:
rd_kafka_conf_set(worker_info.rk_conf, "linger.ms", "1000", NULL, 0);

pthread_t *pd_thread = NULL;
rd_fifoq_t queue;
sensor_queue_init(&queue);
Expand Down

0 comments on commit b39dd11

Please sign in to comment.