Azure / Azure/azure-functions-host

0 functions found when deploying build in Kubernetes linux container from linux

Open
#7,995 6 comments 1 reaction 0 assignees View on GitHub
needs-investigation
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Steps:
1. Create a new "isolated" Azure Functions app in VS 2022 with .net 6.0
2. Create a build in linux using "dotnet build"
3. Create a linux container with dockerfile:

# Installer image
FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4
ENV AzureFunctionsJobHost__Logging__Console__IsEnabled=true \
DOTNET_RUNNING_IN_CONTAINER=true
WORKDIR /home/site/wwwroot
COPY . .

4. Deploy container and verify the functions.metadata and the application dlls are all present in /home/site/wwroot.
5. Check logs in container:

warn: Microsoft.AspNetCore.Server.Kestrel[0]
Overriding address(es) 'http://+:80'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead.
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://127.0.0.1:37427
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /home/site/wwwroot
info: Host.Triggers.Warmup[0]
Initializing Warmup Extension.
info: Host.Startup[503]
Initializing Host. OperationId: '76aa393f-2ef0-4071-8e71-1a32263d547c'.
info: Host.Startup[504]
Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=76aa393f-2ef0-4071-8e71-1a32263d547c
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
LoggerFilterOptions
{
"MinLevel": "None",
"Rules": [
{
"ProviderName": null,
"CategoryName": null,
"LogLevel": null,
"Filter": "b__0"
},
{
"ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
"CategoryName": null,
"LogLevel": "None",
"Filter": null
},
{
"ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
"CategoryName": null,
"LogLevel": null,
"Filter": "b__0"
}
]
}
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
ConcurrencyOptions
{
"DynamicConcurrencyEnabled": false,
"MaximumFunctionConcurrency": 500,
"CPUThreshold": 0.8,
"SnapshotPersistenceEnabled": true
}
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
FunctionResultAggregatorOptions
{
"BatchSize": 1000,
"FlushTimeout": "00:00:30",
"IsEnabled": true
}
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
SingletonOptions
{
"LockPeriod": "00:00:15",
"ListenerLockPeriod": "00:01:00",
"LockAcquisitionTimeout": "10675199.02:48:05.4775807",
"LockAcquisitionPollingInterval": "00:00:05",
"ListenerLockRecoveryPollingInterval": "00:01:00"
}
info: Microsoft.Azure.WebJobs.Hosting.JobHostService[0]
Starting JobHost
info: Host.Startup[401]
Starting Host (HostId=taosplatsvcsapiadminlinuxdeploym, InstanceId=9acf9ae3-c17b-488f-a051-3f2c177f13a9, Version=4.0.1.16815, ProcessId=1, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null))
info: Host.Startup[314]
Loading functions metadata
info: Host.Startup[315]
0 functions loaded
info: Host.Startup[0]
Generating 0 job function(s)
warn: Host.Startup[0]
No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).
info: Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostHttpRoutesManager[0]
Initializing function HTTP routes
No HTTP routes mapped

info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
HttpOptions
{
"DynamicThrottlesEnabled": false,
"EnableChunkedRequestBinding": false,
"MaxConcurrentRequests": -1,
"MaxOutstandingRequests": -1,
"RoutePrefix": "api"
}
info: Host.Startup[412]
Host initialized (86ms)
info: Host.Startup[413]
Host started (97ms)
info: Host.Startup[0]
Job host started
Hosting environment: Production
Content root path: /home/site/wwwroot
Now listening on: http://[::]:80
Application started. Press Ctrl+C to shut down.
info: Host.General[337]
Host lock lease acquired by instance ID '000000000000000000000000643EADBB'.

Contributor guide

Open the contributing guide

Research direction

Reproduce the deployment using the provided Linux build, Dockerfile, and Azure Functions isolated .NET 6 app, then inspect /home/site/wwwroot, functions.metadata, application DLLs, and the startup logs. Done means the container discovers and loads the deployed functions instead of reporting zero functions found.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, docker, kubernetes, linux
Domain
backend, cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.