Skip to content

Instantly share code, notes, and snippets.

View ywkaras's full-sized avatar

Walt Karas ywkaras

View GitHub Profile
$ cat a.cc
template <typename T>
struct C
{
static void f1();
static void f2();
};
void g()
{
/** @file
Stubs for linking plugins with --no-undefined option. Plugins
must also be linked with libstapi.so.
@section license License
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@ywkaras
ywkaras / PR2247_rocky_err.txt
Last active June 13, 2023 22:17
test_UDPNet link error PR 2247 rock PR check
libtool: link: ccache c++ -std=c++17 -ggdb3 -pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -Werror -Wno-invalid-offsetof -Wno-noexcept-type -Wsuggest-override -mcx16 -rdynamic -Wl,--as-needed -o .libs/test_UDPNet test_UDPNet-libinknet_stub.o test_UDPNet-test_I_UDPNet.o ../../proxy/ParentSelectionStrategy.o -L/opt/boringssl/lib64 -L/home/jenkins/workspace/Github_Builds/rocky/src/lib/yamlcpp -L/home/jenkins/workspace/Github_Builds/rocky/src/lib/swoc -L/opt/quiche/lib libinknet.a ../../iocore/eventsystem/libinkevent.a ../../src/records/librecords_p.a ../../src/tscore/.libs/libtscore.so /home/jenkins/workspace/Github_Builds/rocky/src/src/tscpp/util/.libs/libtscpputil.so -lresolv -lcap ../../src/tscpp/util/.libs/libtscpputil.so ../../proxy/hdrs/libhdrs.a -lhwloc -lssl -lcrypto -lpcre /home/jenkins/workspace/Github_Builds/rocky/src/lib/yamlcpp/.libs/libyamlcpp.a /home/jenkins/workspace/Github_Builds/rocky/src/lib/swoc/.libs/li
[Apr 7 02:45:07.957] traffic_server DIAG: (ts_ssl) TSPluginInit() completed.
[Apr 7 02:45:07.958] traffic_server DEBUG: <SSLConfig.cc:479 (reconfigure)> (ssl) Reload SSLConfig
[Apr 7 02:45:07.958] traffic_server DEBUG: <SSLSessionCache.cc:42 (SSLSessionCache)> (ssl.session_cache) Created new ssl session cache 0x15b2050 with 256 buckets each with size max size 400
[Apr 7 02:45:07.958] traffic_server DEBUG: <SSLConfig.cc:759 (getCTX)> (ssl) Look for client cert :/home/wkaras/REPOS/TS/tests/_sandbox/ts_ssl/ts/etc/trafficserver
[Apr 7 02:45:07.958] traffic_server DEBUG: <SSLConfig.cc:776 (getCTX)> (ssl) Load new cert for :/home/wkaras/REPOS/TS/tests/_sandbox/ts_ssl/ts/etc/trafficserver
[Apr 7 02:45:07.959] traffic_server DEBUG: <SSLSNIConfig.cc:198 (reconfigure)> (ssl) Reload SNI file
[Apr 7 02:45:07.959] traffic_server DEBUG: <SSLUtils.cc:1824 (load)> (ssl) currently parsing dest_ip
[Apr 7 02:45:07.959] traffic_server DIAG: (ts_ssl) Lifecycle SSL Secret hook invocation number 1
[Apr 7 02:45:07.959] tr
[Mar 29 21:15:22.663] traffic_server NOTE: records parsing completed.
[Mar 29 21:15:22.663] traffic_server NOTE: /home/wkaras/REPOS/TS/tests/_sandbox/cert_loader_disk/ts/config/records.yaml finished loading
[Mar 29 21:15:22.670] traffic_server NOTE: Traffic Server is running unprivileged, not switching to user 'nobody'
2023-03-29T21:15:22.723Z E 349827 ZTSCLT:ZTSClient:init: cannot open certifcate file: `�� : errno: 2
2023-03-29T21:15:22.723Z E 349827 ZTSCLT:ZTSClient:init: cannot open certifcate file: `�� : errno: 2
[Mar 29 21:15:23.005] traffic_server DEBUG: <SSLConfig.cc:509 (reconfigure)> (ssl_load) Reload SSLConfig
[Mar 29 21:15:23.005] traffic_server DEBUG: <SSLSessionCache.cc:44 (SSLSessionCache)> (ssl.session_cache) Created new ssl session cache 0x18532d0 with 256 buckets each with size max size 400
[Mar 29 21:15:23.005] traffic_server DEBUG: <TLSKeyLogger.cc:51 (enable_keylogging_internal)> (ssl_keylog) Enabling TLS key logging to: /home/wkaras/REPOS/TS/tests/_sandbox/cert_loader_disk/ts/log/tls_sess
@ywkaras
ywkaras / gist:1813bf47779e018515df31bea6523510
Created December 6, 2022 19:35
Example of input to global plugin generation tool
[settings]
plugin_name = my_plugin
[global]
#include <string>
using std::string;
string fixed_value;
@ywkaras
ywkaras / gist:bfd60fdfa585ba21ffa3423f4ab5cfff
Last active November 16, 2022 01:18
Symbols defined in iocore/cache referenced by source code in other directories
cache_config_read_while_writer
CacheHTTPInfoVector::~CacheHTTPInfoVector()
CacheHTTPInfoVector::CacheHTTPInfoVector()
CacheHTTPInfoVector::insert(HTTPInfo*, int)
CacheHTTPInfoVector::marshal(char*, int)
CacheHTTPInfoVector::marshal_length()
cacheProcessor
CacheProcessor::auto_clear_flag
CacheProcessor::dir_check(bool)
CacheProcessor::find_by_path(char const*, int)
Some thoughts…
A general way to model next hop addresses is as an entity stack, entity/sub-entity/sub-sub-entity … . I think the primary data for a next hop address would simply be an up/down flag. A next hop would be down if any entity in its address was down.
The next hop logic could also accept a continuation to schedule when a next hop made a down to up transition.
If DNS lookup was done before next hop lookup, then next hop addresses would naturally be IP-address/IP-port .
If DNS lookup was done as a part of next hop lookup, then next hop addresses would naturally be hostname/IP-port . (A down hostname would be one for which DNS lookup failed, or its IP address is down.) A big disadvantage is that the results of the lookup would have to be provided by scheduling a continuation provided with the lookup request. Another issue is if the DNS lookup results in a load-sharing/protection group of IP addresses. If next hop lookup is going to handle that, it might make sense for it to handle strategies.
RUNNING BUILD WITH PR
-bash-4.2$ sudo traffic_ctl config get proxy.config.diags.debug.enabled
NOTE: using the environment variable TS_RUNROOT
proxy.config.diags.debug.enabled: 0
-bash-4.2$ ysar -ats -int 1 -header 4 | tail
01/13-17:40 3222.4 44125 4.0 399.5 105.5 2432.1 959 3.9 190.3
| ATS Client traffic avg resp Origin traffic
Time req/s cons req/con mbps ms req/s cons req/con mbps
records.config:
CONFIG proxy.config.http.wait_for_cache INT 1
CONFIG proxy.config.http.server_ports STRING 61026 61027:ipv6
CONFIG proxy.config.dns.nameservers STRING 127.0.0.1:61001
CONFIG proxy.config.dns.resolv_conf STRING NULL
CONFIG proxy.config.http.cache.http INT 1
CONFIG proxy.config.http.cache.required_headers INT 0
CONFIG proxy.config.http.uncacheable_requests_bypass_parent INT 0
CONFIG proxy.config.http.no_dns_just_forward_to_parent INT 1
CONFIG proxy.config.http.parent_proxy.mark_down_hostdb INT 0